MySQL study notes. Query data 2

Use aggregate function query

count function

The count function can count the total number of record rows contained in the data table, or return the number of data rows contained in the column according to the query result.
Insert picture description here
Insert picture description here

sum function

Sum function, returns the sum of the specified column values
Insert picture description here

AVG function

Insert picture description here

max function

Returns the maximum value in the specified column
Insert picture description here

min function

Returns the minimum value in the specified column
Insert picture description here

Group query

Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_44862120/article/details/108941770