查询选修了三门课的学生班级、学号、姓名、课程名、课程成绩:
select S.sclass,S.sno,S.sname,C.cname,SC.grade
from S,SC,C
where S.sclass=SC.sclass and S.sno=SC.sno and C.cno=SC.cno and (S.sclass,S.sno) in (select sclass,sno
from SC
group by sno,sclass having(count(*)=3));