select id,g.job job,g.score score from grade g left join (select job,avg(score) ascore from grade group by job) t on g.job=t.job where g.score>t.ascore
select id,g.job job,g.score score from grade g left join (select job,avg(score) ascore from grade group by job) t on g.job=t.job where g.score>t.ascore