Functions for Use with GROUP BY Clauses
Also knownas summary functions, the following are intended for
use with GROUP BY clauses, where they will produce values
based on the set of records making up each row of the final result set.If used without a GROUP BY clause, these functions
will cause the result set to be displayed as a single row, with a value calculated
based on all of the rows of the complete result set. Without a GROUP
BY clause, mixing these functions with columns that do not contain
summary functions will cause an error, because you cannot collapse those columns
into a single row and get a sensible value.