使用SQL语句进行分组检索时,为了去掉不满足条件的分组,应当 ( )(2.0)
A. 使用WHERE子句
B. 在GROUP BY后面使用HAVING 子句
C. 先使用WHERE子句,再使用HAVING子句
D. 先使用HAVING 子句,再使用WHERE子句
基于这样的3个表,即学生表S、课程表C和学生选课表SC,它们的关系模式如下:S(S#,SN,SEX,AGE,DEPT)(学号,姓名,性别,年龄,系别)C(C#,CN)(课程号,课程名称)SC(S#,C#,GRADE)(学号,课程号,成绩).检索4门以上课程的学生总成绩(不统计不及格的课程),并要求按总成绩的降序排列出来。正确的SELECT语句是()。
A. SELECT S
B. ,SUM(GRAGE) FROM SC WHERE GRADE>=60 GROUP BY S
C. ORDER BY S
D. HAVING COUNT(*)>=4
E. SELECT S
F. ,SUM(GRADE) FROM SC WHERE GRADE>=60 GROUP BY S
G. HAVING COUNT(*)>=4 ORDER BY 2 DESC
H. SELECT S
I. ,SUM(GRADE) FROM SC WHERE GRADE>=60 HAVING COUNT(*)<=4 GROUP BY S
J. ORDER BY 2 DESC
K. SELECT S
L. ,SUM(GRADE) FROM SC WHERE GRADE>=60 HAVING COUNT(*)>=4 GROUP BY S
M. ORDER BY 2