MySQL Aggregate Functions


MySQL provides several aggregate functions that are used to calculates the multiple values and return the result in a single value. These functions are often used with the GROUP BY clause of the SELECT statement. Below are the most commonly used aggregate functions

Function Description
COUNT() Returns the number of rows in a set.
SUM() Returns the total sum of a numeric column.
AVG() Calculates the average value of a numeric column.
MIN() and Max() Returns the smallest and largest value in a column.