# 聚合查询
# sum(字段名) 求和
# 求二班学生jsp的总分
select sum(jsp) 'jsp成绩' from student where class like '二班';
# avg(字段) 平均分
select avg(servlet) '平均分' from student where class like '%班%';
# 查询最大年龄 max() min()
select max(age) from student;
# 展示整个字段
select * from student where age = (select max(age) '最老' from student);
# 查询个数 count(*), 不建议在()里面填写条件,因为效率低
select count() from student where class like '%二%';