select
    t.id,
    t.job,
    t.score
from
    (select
        id,
        job,
        score,
        case
            when score>avg(score) over(partition by job) 
            then 1 else 0 end as overavg
    from grade) t
where t.overavg=1
order by t.id