Skip to content
Advertisement

SQL Query aggregate may not appear in WHERE clause (AVG)

Hi I can’t find a solution how to fix this problem.

An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING clause or a select list, and the column being aggregated is an outer reference.

Should be like this : AVG is 28.3 so UnitPrice higher than 28.3

Having also don’t work

Advertisement

Answer

Use a subquery instead:

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement