Aggregate functions
Aggregate functions are database operations that perform calculations across multiple rows of data to produce a single summarized result. These functions analyze data sets to return computed values like sums, averages, counts, or other statistical measures.
Function |
Signature |
Description |
---|---|---|
|
AVG (expression) |
Returns the average of a numerical expression. |
|
COUNT (expression) |
Returns the number of rows that match the given criteria. |
|
MAX (expression) |
Returns the largest value of the selected expressions. |
|
MIN (expression) |
Returns the smallest value of the selected expressions. |
|
SUM (expression) |
Returns the sum of a numerical expression. |
|
STDDEV (expression) |
Returns the sample standard deviation. |
|
GROUP BY expression |
Returns a row created by the grouping columns. |
|
HAVING boolean-expression |
Returns group rows filtered by |
Examples of all functions:
Function |
Example |
---|---|
AVG |
|
COUNT |
|
MAX |
|
MIN |
|
SUM |
|
STDDEV |
|
|
|