柠檬试题库
search
首页 计算机 公务员 驾照 关于

基于"学生-选课-课程"数据库中的三个关系: S(S#,SNAME,SEX,BIRTHYEAR,DEPT),主码为S# C(C#,CNAME,TEACHER),主码为C# SC(S#,C#,GRADE),主码为(S#,C#) 查找"由王建老师执教的操作系统课程的平均成绩、最高成绩和最低成绩",正确的SQL语句是


  • A.SELECT AVG(GRADE), MAX(GRADE), MIN(GRADE) FROM C, SC GROUP BY CNAME = "操作系统" AND TEACHER = "王建"
  • B.SELECT AVG(GRADE), MAX(GRADE), MIN(GRADE) FROM C, SC WHERE CNAME = "操作系统" AND TEACHER = "王建" AND SC.C# = C.C#
  • C.SELECT AVG(GRADE), MAX(GRADE), MIN(GRADE) FROM C, SC HAVING CNAME = "操作系统" AND TEACHER = "王建" AND SC.C# = C.C#
  • D.SELECT AVG(GRADE), MAX(GRADE), MIN(GRADE) FROM C, SC HAVING CNAME = "操作系统" AND TEACHER = "王建"
热度🔥294
参考答案:B
解析:打开微信小程序查看本题解析