An aggregate function refers to a set of input values and returns one single result value. If the table is subdivided into several groups with the GROUP BY clause, an aggregate function calculates a value for each of these groups.
If a GROUP BY clause is not stated, an aggregate function always refers to the entire table. This type of query then returns exactly one result row. Aggregate functions are sometimes referred to as set functions.