17,090
社区成员
发帖
与我相关
我的任务
分享
select count(distinct sno) cnt
from sc t
where not exists (select 1
from sc t1
where t1.grade < 90
and t.sno = t1.sno);
select c.cname, sum(case when sc.grade>=90 then 1 else 0 end) as upper_90_num
from c join sc on c.cno=sc.cno
group by c.cname;