with
t1 as(
    select
        job,
        floor((count(*)+1)/2) as start,
        ceiling((count(*)+1)/2) as end
    from
        grade
    group by
        job
    order by
        job
)

select * from t1