1. COUNT (E1)
Syntax: COUNT (E1)parameter: E1 is an expression that can be any data typereturn: Return numeric datafunction: Returns e1 the total number of records for which the specified column is not empty Example:
1) Use alone 2) combined with group by 2.Syntax: SUM (E1)parameter: E1 is an expression of type numericreturn: Return numeric datafunction: Sums the columns specified by the E1Example: 1) use alone 2) combined with GROUP by 3, MIN (E1), MAX (E1)
Syntax: MIN (E1), MAX (E1)parameter: E1 is an expression of a character, date, or numeric type. If the E1 is a character type, the maximum and minimum values are judged according to the ASCII code. return: Returns the data of the corresponding type according to the type of the E1 parameter. function: Min (e1) returns the minimum value in the column specified by the E1 expression;Max (E1) returns the maximum value in the column specified by the E1 expression;Example: 1) 2) 4, AVG
Syntax: AVG (E1)parameter: E1 is an expression of a numeric typereturn: Returns a numeric type datafunction: Averages the columns specified by the E1 expression. Example: 1)2)
MySQL Learning Note (v) commonly used aggregation functions