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()
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework