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