ANSI SQL Aggregate Functions
Aggregate functions return a single value based upon a set of other values. If used among other expressions in the item list of a SELECT statement, the SELECT must have a GROUP BY or HAVING clause. No GROUP BY or HAVING clause is required if the aggregate function is the only value retrieved by the SELECT statement. The aggregate functions supported by the ANSI SQL standard and their syntax are listed in Table 4-1.
Function | Usage |
| Computes the average value of a column given by |
| Computes a correlation coefficient |
| Counts the rows defined by the |
| Counts all rows in the specified table or view |
| Computes population covariance |
| Computes sample covariance |
| Computes the relative rank of a hypothetical row within a group of rows, where the rank is equal to the number of rows less than or equal to the hypothetical row divided by the number of rows in the group |
| Generates a dense rank (no ranks are skipped) for a hypothetical row ( |
| Finds the minimum value in a column given by |
| Finds the maximum value in a column given by |
|