About 77,900 results
Open links in new tab
  1. How to avoid error "aggregate functions are not allowed in WHERE"

    Jan 8, 2014 · This sql code throws an aggregate functions are not allowed in WHERE SELECT o.ID , count (p.CAT) FROM Orders o INNER JOIN Products p ON o.P_ID = p.P_ID WHERE …

  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. 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 …

  4. 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 344k times

  5. 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, …

  6. 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 …

  7. sql - TSQL Pivot without aggregate function - Stack Overflow

    sql parameterised cte query The answer to that question involves a situation where pivot without aggregation is needed so an example of doing it is part of the solution.

  8. sql - Applying the MIN aggregate function to a BIT field - Stack …

    Also, I always run into this sort of issue when I'm forced to aggregate a field that I know (due to constraints) will always be the same value, so why can't there just be an aggregate function …

  9. SQL Server pivot on 2 (or multiple) aggregates - Stack Overflow

    Jul 27, 2017 · SQL Server pivot on 2 (or multiple) aggregates Asked 8 years, 3 months ago Modified 4 years, 5 months ago Viewed 20k times

  10. sql - GROUP BY without aggregate function - Stack Overflow

    Nov 19, 2013 · SQL requires that if a column is in the SELECT clause and is not used within an aggregate function, it must be included in the GROUP BY clause. Since resource.rId is …