select a.job, ceil((a.count_)/2) start, ceil((a.count_+1)/2) end from (select job,count(*) count_ from grade group by job) a order by a.job