查询“至少选修了学号为109的学生选修的全部课程的学生号”
------解决方案--------------------
- SQL code
select a.snofrom score ainner join (select cno from score where sno='109') bon a.cno=b.cno and a.sno<>'109'group by a.snohaving count(*)>=(select count(*) from (select cno from score where sno='109'))