一、聚合函数练习 1、统计,统计共有多少个学生 Select count (*) as 学生数量 from A_studentinfo 2、统计,统计年龄大于 20 岁的学生有多少个 Select count(*) as 学生数量 from A_studentinfo where (2008-yearofbirth)>20 3、统计,统计入学时间在 1980 年至 1982 年的学生人数 select count(*) as 学生数量 from A_studentinfo where enrollment between '1998-01-01' and '2003-12-30' 对比以下查询方式,看看有何不同,为什么
select count(*) as 学生数量 from A_studentinfo where enrollment between '1998' and '2003' 4、统计,统计学号为"S001"的学生的平均成绩 Select avg(score) as 平均成绩 from A_studentcourse where sno='S001' 5、统计,统计学号为"S001"的学生的总成绩 select sum(score) as 总成绩 from A_studentcourse where sno ='S001' 6、统计,查询课程号为”C001”的课程的最高成绩 select max(score) as 最高成绩 from A_studentcourse where cno='C001' 7、统计,查询所有学生中的最大年龄是多少 select 2008-min(yearofbirth) as 最大年龄 from