One, AVG
AVG (COL)
Returns the average of the specified column
Two, COUNT
COUNT (COL)
Returns the number of non-null values in the specified column
Third, Min/max
Min (col): Returns the minimum value of the specified column
Max (COL): Returns the maximum value for the specified column
Four, SUM
SUM (COL)
Returns the sum of all the values of the specified column
Five, Group_concat
Group_concat ([DISTINCT] expr [, expr ...]
[ORDER BY {Unsigned_integer | col_name | expr}
[ASC | DESC] [, col_name ...]]
[SEPARATOR Str_val])
Returns the result of a combination of column-value joins that belong to a group
SELECT Id,group_concat (name) from my_table GROUP by ID;
SELECT id,group_concat (name separator '; ') From my_table GROUP by ID;
SELECT Id,group_concat (name order by ID) from my_table GROUP by ID;
SELECT Id,group_concat (name ORDER by ID separator '; ') From my_table GROUP by ID;
The above is a small series for everyone to bring the MySQL common aggregate function detailed content, I hope that we support cloud Habitat Community ~