with temp as (select job, count(*) as num from grade group by job) select job, round(case when num%2 = 1 then (num+1) / 2 when num%2 = 0 then num/2 end,0) as 'start', round(case when num%2 = 1 then (num+1) / 2 when num%2 = 0 then (num/2)+1 end,0) as 'end' from temp order by job;

京公网安备 11010502036488号