试试这个
select
(select avg(grade) from stscore where classno='Class1' and course='English') -
(select avg(grade) from stscore where classno='Class2' and course='English')
select s.classno,count(*) from stscore s, (
select classno,avg(grade) score from stscore where course='French' group by classno
) t
where s.classno=t.classno and s.course='French' and s.grade<t.score group by s.classno