MySQL aggregate functions and grouping
aggregate functions
MySQL aggregate functions retrieve a single value after performing a calculation on a set of values.
In general, aggregate functions ignore null values.
Often, aggregate functions are accompanied by the GROUP BY clause of the SELECT statement.
List of MySQL aggregate functions and a hint of what they do
AVG()
MySQL AVG() retrieves the average value of the argument.
BIT_AND()
MySQL BIT_AND() bitwise and.
BIT_OR()
MySQL BIT_OR() retrieves bitwise or.
BIT_XOR()
MySQL BIT_OR() retrieves bitwise xor.
COUNT(DISTINCT)
MySQL COUNT(DISTINCT) retrieves the count of a number of different values.
COUNT()
MySQL COUNT() retrieves a count of the number of rows returned.
GROUP_CONCAT()
MySQL GROUP_CONCAT() retrieves a concatenated string.
MAX()
MySQL MAX() retrieves the maximum value.
MIN()
MySQL BIT_OR() retrieves the minimum value.
STD()
MySQL MIN()retrieves the population standard deviation.
STDDEV_POP()
MySQL BIT_OR() retrieves the population standard deviation.
STDDEV_SAMP()
MySQL STDDEV_POP() retrieves the sample standard deviation.
STDDEV()
MySQL STDDEV() retrieves the population standard deviation.
SUM()
MySQL SUM() retrieves the sum.
VAR_POP()
MySQL VAR_POP() the population standard variance.
VAR_SAMP()
MySQL VAR_POP() the sample variance.
VARIANCE()
MySQL VAR_POP()the population standard variance.
Previous:
MySQL UNION
Next:
AVG()
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/mysql/aggregate-functions-and-grouping/aggregate-functions-and-grouping-in-mysql.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics