This section describes each aggregate function. Many of the examples use a subquery. For detailed information about subqueries, see the Subqueries” section later in this chapter.
A few general aspects of aggregate functions include:
Aggregate functions return NULL when they encounter an error.
Most uses for aggregate functions include a GROUP
BY clause, which is specified in each description. If an
aggregate function is used without a GROUP BY
clause it operates on all rows.