聚合查詢
常用的聚合查詢有:sum() avg() max() min() count()
需求:查詢學生的math的總成績(sun()求和函數)
select sum (math)as ‘math的總成績’from result;
查詢 math 的平均分
select avg(math) as 'math的平均分'from result;
select max(math)as'math的最高分'from result;
最低分同上
統計學生學生的個數
select count(id)as'學生的個數'from student;