#聚合函数aggregate functions
#count(),括号内是字段名or*,数数
select count(*) from `employee`;
select count(`sup_id`) from `employee`;
select count(*) from `employee`
where `birth_date` >'1970-01-01' and `sex`='F';
#avg()
#max()
#sum()
#min(),括号内是字段名
#取得所有员工的平均薪水
select avg(`salary`) from `employee`;
#取得所有员工的总薪水
select sum(`salary`) from `employee`;
#取得所有员工的薪水最高值
select max(`salary`) from `employee`;
#取得所有员工的薪水最小值
select min(`salary`) from `employee`;
语法内容的总结
1:聚合函数?列举