An aggregate expression calculates a single value from a range of rows.
An aggregate expression is one in which either an aggregate function is used, or in which one or more of the operands is an
When a SELECT statement does not have a GROUP BY clause, the expressions in the select-list must either contain all aggregate expressions or no aggregate expressions. When a SELECT statement does have a GROUP BY clause,
any non-aggregate expression in the select-list must appear in the GROUP BY list.