• 2022-06-07
    设关系模式SCG (S#, C#, grade)中S#为学生学号,C#为课程号,grade为某学号学生学某号课程的考试成绩。今要查询每门课程的平均成绩,且要求查询的结果按平均成绩升序排列,平均成绩相同时,按课程号降序排列,则用SQL查询语言应为 (1) 。 若查询的结果仅限于平均分数超过80分的,则应 (2) 。 (1)
    A: Select C#,AVG(grade) From SCG Group by grade Order by 2,C# Desc
    B: Select C#,AVG(grade) From SCG Group by C# Order by 2,C# Desc
    C: Select C#,AVG(grade) From SCG Where C#,AVG Desc Group by grade
    D: Select C#,AVG(grade) From SCG Group by AVG(grade) Order by 2,C# Desc
  • 举一反三