题解 | #考试分数(五)#
考试分数(五)
http://www.nowcoder.com/practice/b626ff9e2ad04789954c2132c74c0512
with t1 as (select * ,row_number() over(partition by job order by score desc) t_rank
from grade)
select t1.* from t1
join (select job,floor((count()+1)/2) start,floor((count()+2)/2) end from grade
group by job) t2
on t1.job=t2.job
where t1.t_rank=t2.start or t1.t_rank=t2.end
order by id;

三奇智元机器人科技有限公司公司福利 131人发布