主要学习count()总条数、sum()求和、max()最大值,min()最小值和having过滤
having与where的区别在于,having是对查询结果进行条件过滤,而where是在查询前就对数据进行过滤
select count(1) from score;
select math,count(1) '总数' from score group by math;
select math,count(1) '总数' from score group by math having math>80;
select sum(math) from score;
select max(math) from score;
select min(math) from score;