【关键】关键是case when 函数的运用!
【代码如下】
select job,
case when count(score)%2=0 then floor(count(score)/2) else floor(count(score)/2)+1 end as start,
case when count(score)%2=0 then floor(count(score)/2)+1 else floor(count(score)/2)+1 end as end
from grade group by job
order by job