...课程表c(cno、cname,cteacher)选课表sc(sno、cno、score)
发布网友
发布时间:2024-10-04 15:02
我来回答
共1个回答
热心网友
时间:2024-10-17 03:33
--1
select * from s where s.sno not in(select sno from c,sc where c.cno=sc.cno and c.cteacher='张三')
--2
select (select sname from s where s.sno=main.sno),avg(sc.score)
from s main,sc
where main.sno=sc.sno
and main.sno in(select sno from s s1,sc sc1 where s1.sno=sc1.sno and sc1.score<60 group by s1.sno having count(sno)>=2)