小做一下表链接就好了

select g.id,g.job,g.score
FROM grade g JOIN (select job,avg(score) a FROM grade GROUP BY job) t on g.job=t.job
WHERE g.score>a
order BY id