**sql复习**
表如上:
1.用一条语句查出每门可能都在80分以上的学生
select name from student
group by name
having Min(sorce)>80
或者
select distinct name from student
where name not in (select distinct name from student where sorce<=80);
2.写一条sql语句 求出2门以及两门以上不及格科目的学生的平均分
select sname ,avg(sorce)
from student
where grade<60
group by name
having count(*)>2