统计个数
统计age=20的age个数
select count(age) from student where age =20;
求和
把所有人年龄加起来
select sum(age) from student;
求平均值
获取平均年龄
select avg(age) from student;
求最大最小值
获取最大最小年龄
select max(age),min(age) from student;
group by
以某一字段(age)为组,相同的就折叠起来
select * from student group by age;
统计各年龄的人数
select age,count(age) from student group by age;