select sno, avg(DISTINCT grade) as 平均成绩
from SC
group by sno
where avg(DISTINCT grade)>70
order by avg(grade) desc
在这里用where还是比较好的
select * from
(select sno, avg(DISTINCT grade) as 平均成绩
from SC
group by sno
HAVING avg(DISTINCT grade)>70)
order by 平均成绩 desc