• 2022-06-11
    统计只有2名以下(含2名)学生选修的课程情况,统计结果中的信息包括课程名称、开课院系和选修人数,并按选课人数排序。正确的命令是( )。
    A: SELECT 课程名称,开课院系,COUNT(课程编号)AS 选修人数; FOR 成绩,课程 WHERE 课程.课程编号=成绩.课程编号; GROUP BY 成绩.课程编号 HAVING COUNT(*)<=2; ORDER BY COUNT(课程编号)
    B: SELECT 课程名称,开课院系,COUNT(学号) 选修人数; GROUP BY 成绩,课程编号 HAVING COUNT(*)<=2; ORDER BY COUNT(学号)
    C: SELECT 课程名称,开课院系,COUNT(学号)AS 选修人数; FROM 成绩,课程 WHERE 课程.课程编号=成绩.课程编号; GROUP BY 课程名称 HAVING 选修人数<=2; ORDER BY 选修人数
    D: SELECT 课程名称,开课院系,COUNT(学号)AS 选修人数; FROM 成绩,课程 HAVING COUNT(课程编号)<=2; GROUP BY 课程名称 ORDER BY 选修人数
  • 举一反三