用SQL语句相关子查询实现,查询至少选修了平均成绩大于80分的全部课程的学生的姓名和所在系。
3条回答 默认 最新
S875 2023-04-03 15:23关注老师给的答案,谢谢各位的回答
select sname,sdept from student swhere not exists( select cno from sc sc1 where
not exists ( select * from sc where cno=sc1.cno and sno=s.sno)
group by cno having avg(grade)>80)
本回答被题主选为最佳回答 , 对您是否有帮助呢?评论 打赏 举报解决 1无用