【单选题】学生表:S(学号,姓名,性别)和选课成绩表:SC(学号,课程号,成绩),用SQL语言检索选修课程在5门以上(含5门)的学生的学号、姓名和平均成绩,并按平均成绩降序排序,正确的命令是______。
A.
SELECT S.学号,姓名,AVG(成绩) 平均成绩 FROM S,SC; WHERE \r\nS.学号=SC.学号; GROUP BY S.学号,姓名 HAVING COUNT(*)> =5 ORDER BY 3 \r\nDESC
B.
SELECT S.学号,姓名,AVG(成绩) FROM S,SC; WHERE S.学号=SC.学号 AND \r\nCOUNT(*)> =5; GROUP BY 学号,姓名 ORDER BY 3 DESC
C.
SELECT S.学号,姓名,AVG(成绩) 平均成绩 FROM S,SC; WHERE S.学号=SC.学号 \r\nAND COUNT(*)> =5; GROUP BY S.学号,姓名 ORDER BY 平均成绩 DESC
D.
D.SELECT S.学号,姓名,平均成绩 FROM S,SC; WHERE \r\nS.学号=S学号; GROUP BY S.学号,姓名 HAVING COUNT(*)> =5 ORDER BY 平均成绩 \r\nDESC