sql script
select job, 
case when count(job) % 2=0 then round(count(job)/2,0)
     when count(job) % 2!=0 then round(ceil(count(job)/2),0)
end as start,
case when count(job) % 2=0 then round(count(job)/2+1,0)
     when count(job) % 2!=0 then round(ceil(count(job)/2),0)
end as end
from grade 
group by job
order by job 


 京公网安备 11010502036488号
京公网安备 11010502036488号