SQL 简单语句求助 高分!!~~~~ 做完后再追加100分

来源:百度知道 编辑:UC知道 时间:2024/05/08 13:02:05

已经发到你的邮箱了,gyhmichael@163.com

你提供的网站打不开

11.select cno,avg(case when cno!='' then grade else 0 end) as 'avgs'
from sc
group by cno

12.select cno,avg(case when cno!='' then grade else 0 end) as 'avgs'
from sc
group by cno order by avgs desc

13.select sno,sum(case when cno!='' then 1 else 0 end) as 'shuliang'
from sc
group by sno

14.select sno,sum(case when cno!='' then 1 else 0 end) as 'shuliang'
from sc
group by sno order by shuliang

15.
select c.cname ,b.avgs from course as c, ( select cno,avg(case when cno!='' then grade else 0 end) as 'avgs'
from sc
group by cno) as b
where c.cno=b.cno

16.
select c.cname,c.cno ,b.avgs from course as c, ( select cno,avg(case when cno!='' then grade else 0 end) as 'avgs'
from sc
group by cno) as b
where c.cn