Aggregate Functions
COUNT()
Returns the number of rows that matches a specified criterion.
count(*) - Returns the number of records in a table.
count(expression) - Returns number of rows where expression is not NULL.
count(distinct expression) - Returns number of distinct values of expression.
AVG()
avg(expression) - Average (arithmetic) of expression.
MIN()
min(expression) - Minimum value for expression.
MAX()
max(expression) - Maximum value for expression.
SUM()
sum(expression) - Sum of the values of expression.
STDDEV_POP()
stddev_pop(expression) - Population standard deviation.
STDDEV_SAMP()
stddev_samp(expression) - Unbiased sample standard deviation.
VAR_POP()
var_pop(expression) - Population variance.
VAR_SAMP()
var_samp(expression) - Unbiased sample variance.