Aggregate Functions Used with the group by Clause

Aggregate functions are often used with the group by clause, which divides the tables into groups.

Aggregate functions produce a single value for each group. Without group by, an aggregate function in the select list produces a single value as a result, whether it is operating on all rows in a table or a subset of rows defined by the where clause.