题解 | #考试分数(四)#
考试分数(四)
http://www.nowcoder.com/practice/502fb6e2b1ad4e56aa2e0dd90c6edf3c
select job ,start,end
from (select job,if(count()%2=0,round(count()/2),round((count()+1)/2)) start,
if(count()%2=0,round(count()/2+1),round((count()+1)/2)) end
from grade group by job order by score) t
order by job;