位置上的所有 | #考试分数(五)#

考试分数(五)

http://www.nowcoder.com/practice/b626ff9e2ad04789954c2132c74c0512

with tt as(
select job,score,t_rank
from
(select id,job,score,dense_rank()over(partition by job order by score desc) t_rank,row_number()over(partition by job order by score desc) px,round(count(id)over(partition by job)/2) s,round((count(id)over(partition by job)+1)/2) e
from grade) t
where px = s or px = e)

select grade.id,grade.job,grade.score,tt.t_rank
from grade,tt
where grade.job = tt.job and grade.score = tt.score
group by grade.id
order by grade.id










全部评论

相关推荐

点赞 评论 收藏
分享
allin实习的大白...:我把第二个项目发出来了,如果感兴趣可以去研究研究,欢迎交流。 https://gitee.com/jtyjtyjty333/ind-dist-ai-sec-edge-cloud https://github.com/jtylab/ind-dist-ai-sec-edge-cloud
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务