查询至少选修了2号课程和8号课程的学生姓名
select s.sname from s,sc where s.sno=sc.sno and sc.cno in (2,8) group by s.sname having count(*)>=2
查询张红的年龄
select age from s where sname='张红'
查询李明同学不及格的课程名称
select c.cname from s,sc,c where s.sno=sc.sno and c.cno=sc.cno and sc.grade<60 and s.sname='李明'
查询选修了“计算机网络”的学生姓名
select s.sname from s,sc,c where s.sno=sc.sno and c.cno=sc.cno and c.cname='计算机网络'
查询“计算机网络”成绩在90分以上的学生姓名
select s.sname from s,sc,c where s.sno=sc.sno and c.cno=sc.cno and c.cname='计算机网络'
and sc.grade>90