select 学号 from 成绩表
where 学号 not in
(select 学号 from 成绩表 where 成绩<80 group by 学号) group by 学号 having count(课程号)>2
select 学号
from 成绩表
where 成绩>80
group by 学号
having COUNT(课程号)>2
use stu
select sno
from SC
where grade>=80
group by sno
having count(cno)>=2