Skip to main content

Aggregate Functions

An aggregate function performs a calculation on a set of values, and returns a single value. Except for COUNT(*), aggregate functions ignore null values. Aggregate functions are often used with the GROUP BY clause of the SELECT statement.

FUNCTIONDESCRIPTION
AVGThe average of all values contained in the group.
COUNTThe number of values contained in the group
MAXThe maximum value for a specified group.
MINThe maximum value for a specified group.
STDEVThe sample standard deviation of the values contained in a group
STDEVPThe population standard deviation of the values contained in a group
SUMThe sum of all values contained in the group.
VARThe sample variance of the values contained in a group
VARPThe population variance of the values contained in a group