题解 | #考试分数(四)#
考试分数(四)
https://www.nowcoder.com/practice/502fb6e2b1ad4e56aa2e0dd90c6edf3c
select job, round(case when count(job)%2=1 then (1+count(job))/2 else count(job)/2 end) start, round(case when count(job)%2=1 then (1+count(job))/2 else count(job)/2+1 end) end from ( select job, score, rank() over(partition by job order by score) r from grade )t group by job order by job