About 79,300 results
Open links in new tab
  1. Aggregate function in SQL WHERE-Clause - Stack Overflow

    May 13, 2014 · In a test at university there was a question; is it possible to use an aggregate function in the SQL WHERE clause. I always thought this isn't possible and I also can't find …

  2. Why are aggregate functions not allowed in where clause

    @AlexPoole - I read the question to mean, "Why did the designers of SQL need to restrict the use of aggregate functions, so they can only be in a HAVING clause and not in WHERE?

  3. Why is there no PRODUCT aggregate function in SQL?

    Oct 12, 2010 · Out of interest, there is indeed demand in SQL Server Land for new set functions but for those of the window function variety (and Standard SQL, too). For more details, …

  4. Aggregate SQL Function to grab only the first from each group

    Apr 21, 2017 · 2 First and Last do not exist in Sql Server 2005 or 2008, but in Sql Server 2012 there is a First_Value, Last_Value function. I tried to implement the aggregate First and Last …

  5. sql - How to aggregate boolean column - Stack Overflow

    Jun 21, 2016 · Mysql / Mariadb also have BIT_AND and BIT_OR aggregate functions which you can apply to columns of boolean values. Postgres has BOOL_AND and BOOL_OR. I think it …

  6. SQL GROUP BY CASE statement with aggregate function

    SQL GROUP BY CASE statement with aggregate function Asked 16 years, 3 months ago Modified 2 years, 4 months ago Viewed 343k times

  7. How do I select columns together with aggregate functions?

    Jun 23, 2012 · If I change the WHERE to HAVING because of the aggregate functions, I get errors telling me to remove each of the other column names that aren't contained in either an …

  8. Multiplication aggregate operator in SQL - Stack Overflow

    Dec 28, 2018 · In SQL there are aggregation operators, like AVG, SUM, COUNT. Why doesn't it have an operator for multiplication? "MUL" or something. I was wondering, does it exist for …

  9. Function to Calculate Median in SQL Server - Stack Overflow

    According to MSDN, Median is not available as an aggregate function in Transact-SQL. However, I would like to find out whether it is possible to create this functionality (using the Create …

  10. What is the difference between PARTITION BY and GROUP BY

    The SQL GROUP BY clause can be used in a SELECT statement to collect data across multiple records and group the results by one or more columns. In more simple words GROUP BY …