求所有科目都大于80分的学生姓名

  

 

 

蠢蠢的我=》

 

select  t1.name from 
( select name,count(*) as num from table t where fenshu>80 group by name) t1
join
( select name,count(kecheng) as num from table group by name ) t2 
on t1.name=t2.name and t1.num=t2.num

 

大佬代码=》

select name group by name having min(fenshu)>80

 

我哭晕在厕所...

 

posted @ 2020-05-25 15:44  郭大侠1  阅读(455)  评论(0编辑  收藏  举报