sql语句问题。找出每个学生超过他选修课程平均成绩的课程号。
我这样写对吗selectsno,cnofromscgroupbysno,cnohavinggrade>=avg(grade)或者这样写selectSno,CnofromS...
我这样写对吗
select sno ,cno
from sc
group by sno,cno
having grade >= avg(grade)
或者这样写
select Sno,Cno
from SC
where Grade >=
(select avg (grade)
from sc
)
这都对吗? 展开
select sno ,cno
from sc
group by sno,cno
having grade >= avg(grade)
或者这样写
select Sno,Cno
from SC
where Grade >=
(select avg (grade)
from sc
)
这都对吗? 展开
6个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询