When passing a single argument to an aggregate function, that argument can be preceded by the keyword DISTINCT, which filters out duplicate values.
For all aggregations other than COUNT( * ), NULL and missing values are ignored.
AVG( num_expr ) |
||
COUNT( expr ) COUNT( * ) |
Counts the number of times expr is not NULL in the group. COUNT( * ) returns the total number of rows in the group.
|
|
GROUP_CONCAT( expr, <separator = ’,’> ) |
Concatenates all non-NULL values of expr and returns them as a string. Numeric values of expr are converted to character. If separator is present, it is placed between the values. The default separator is a comma. DISTINCT can be used only with GROUP_CONCAT() if separator is not specified.
|
|
MAX( expr ) |
||
MIN( expr ) |
||
STDDEV_POP( num_expr ) |
Computes the population standard deviation of num_expr for the group.
|
|
STDDEV_SAMP( num_expr ) |
Computes the sample standard deviation of all num_expr for the group.
|
|
SUM( num_expr ) |
||
TOTAL( num_expr ) |
||
VAR_POP( num_expr ) |
Computes the population variance of num_expr for the group.
|
|
VAR_SAMP( num_expr ) |
Computes the sample variance of num_expr for the group.
|