题目内容:
查询选修课程在5门以上(含5门)的学生的学号、姓名和平均成绩,并按平均成绩降序排序,正确的命令是( )。A)SELECT s.学号,姓名,平均成绩FROM student s,score sc
WHERE s.学号=sc.学号
GROUP BY s.学号HAVING COUNT(﹡)﹥=5 0RDER BY平均成绩DESC
B)SELECT s.学号,姓名,AVG(成绩)FROM student s,score sc
WHERE s.学号=sc.学号AND COUNT(﹡)﹥=5
GROUPBY学号ORDERBY 3 DESC
C)SELECT s.学号,姓名,AVG(成绩)平均成绩FROM student s,score sc
WHERE s.学号=sc.学号AND COUNT(﹡)>=5
GROUP BY s.学号ORDER BY平均成绩DESC
D)SELECT s.学号,姓名,AVG(成绩)平均成绩FROM student s,score sc
WHERE s.学号=sc.学号
GROUP BY s.学号HAVING COUNT(﹡)>=5 0RDER BY 3 DESC
参考答案:
答案解析: