1
Aggregate Functions
This category is about built-in aggregate functions. For custom aggregate functions, see stored aggregate functions.
The following functions (also called aggregate functions) can be used with the GROUP BY clause:
-
Stored Aggregate Functions
Custom aggregate functions. -
AVG
Returns the average value. -
BIT_AND
Bitwise AND. -
BIT_OR
Bitwise OR. -
BIT_XOR
Bitwise XOR. -
COUNT
Returns count of non-null values. -
COUNT DISTINCT
Returns count of number of different non-NULL values. -
GROUP_CONCAT
Returns string with concatenated values from a group. -
JSON_ARRAYAGG
Returns a JSON array containing an element for each value in a given set of JSON or SQL values. -
JSON_OBJECTAGG
Returns a JSON object containing key-value pairs. -
MAX
Returns the maximum value. -
MIN
Returns the minimum value. -
STD
Population standard deviation. -
STDDEV
Population standard deviation. -
STDDEV_POP
Returns the population standard deviation. -
STDDEV_SAMP
Standard deviation. -
SUM
Sum total. -
VARIANCE
Population standard variance. -
VAR_POP
Population standard variance. -
VAR_SAMP
Returns the sample variance.
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.