Aggregate functions

Aggregate functions summarize data over a group of rows from the database. The groups are formed using the GROUP BY clause
of the SELECT statement. Aggregate functions are allowed only in the select list and in the HAVING and ORDER BY clauses of
a SELECT statement.