按照课程号进行分组,统计学生平均成绩大于60分的学生的信息( )
A: select cid,avg(grade) from sc group by cid having avg(grade)>60
B: select cid,avg(grade) from student group by cid having avg(grade)>60
C: select cid,avg(grade) from course where avg(grade)>60 group by cid
D: select cid,avg(grade) from student where avg(grade)>60 group by cid
A: select cid,avg(grade) from sc group by cid having avg(grade)>60
B: select cid,avg(grade) from student group by cid having avg(grade)>60
C: select cid,avg(grade) from course where avg(grade)>60 group by cid
D: select cid,avg(grade) from student where avg(grade)>60 group by cid
举一反三
- 统计选修了a001课程的学生的平均成绩( ) A: select cid,avg(grade) from student group by cid having cid=’a001’ B: select cid,avg(grade) from student where cid=’a001’ group by cid C: select cid,avg(grade) from course where cid=’a001’ group by cid D: select cid,avg(grade) from sc where cid=’a001’ group by cid
- 按照学号进行分组,统计学生的平均成绩() A: select sid, avg(grade) from student group by cid B: select sid, avg(grade) from student group by sid C: select sid, avg(grade) from sc group by sid D: select sid, avg(grade) from sc group by cid
- 按照学号进行分组,统计学生的平均成绩,且平均分按降序排列 A: select sid, avg(grade) from sc group by sid order by avg(grade) desc B: select sid, avg(grade) from sc group by cid order by avg(grade) desc C: select sid, avg(grade) from student group by sid order by avg(grade) desc D: select sid, avg(grade) from student group by cid order by avg(grade)
- 查询选修了a001号课程的学生的最高成绩() A: select cid, max(grade) from course where cid=’a001’ group by cid B: select cid,max(grade) from student where cid=’a001’ group by cid C: select cid, max(grade) from sc where cid=’a001’ group by cid D: select cid, max(grade) from student group by cid having cid=’a001’
- 在学生选课数据库中,查询平均成绩大于等于60分的同学,SQL语句为( ) A: SELECT Sno, AVG(Grade) FROM SC GROUP BY Sno HAVING AVG(Grade)>=60; B: SELECT Sno FROM SC WHERE Grade>=60 GROUP BY Sno; C: SELECT Sno, Grade FROM SC GROUP BY Sno HAVING AVG(Grade)>=60; D: SELECT Sno FROM SC GROUP BY Sno HAVING Grade >=60;