• 2022-06-03
    有一个“成绩”表,包含学号、课程号、成绩三个字段。要求查询2科以上不及格(包括2科)学生信息。显示学号、不及格课程数。对应的SQL语句为( )
    A: select 学号,count(*) as 不及格课程数 from 学生 having 成绩<60 group by 学号 where count(*)>=2
    B: select 学号,count(*) as 不及格课程数 from 学生 where 成绩<60 group by 学号 where count(*)>=2
    C: select 学号,count(*) as 不及格课程数 from 学生 where 成绩<60 group by 学号 having 不及格课程数>=2
    D: select 学号,count(*) as 不及格课程数 from 学生 where 成绩<60 group by 学号 having count(*)>=2
  • 举一反三