select job,floor((max(rk)+1)/2) as start,
ceil((max(rk)+1)/2) as end
from 
(select job,score, 
row_number() over(partition by job order by score DESC) as rk
from 
grade) as A
group by job
order by job