table of Contents
Aggregate function: Take a column of data as a whole and perform vertical calculations.
2.max: calculate the maximum value
3.min: calculate the minimum value
Aggregate function: Take a column of data as a whole and perform vertical calculations.
1.count: count the number
① Generally choose a non-empty column: primary key (to learn later)
②count (*) [all columns-not recommended]
2.max: calculate the maximum value
3.min: calculate the minimum value
4.sum: calculate the sum
5.avg: calculate the average
Note: The calculation of aggregate functions excludes null values.
solution:
①Choose not to include non-empty columns for calculation
②IFNULL function