题解 | #每类试卷得分前3名#

每类试卷得分前3名

https://www.nowcoder.com/practice/255aa1863fe14aa88694c09ebbc1dbca

#select tid,uid,ranking from (
#(select tag as tid,uid,row_number() over (partition by tag order by score DESC ) as ranking  from examination_info as i join exam_record as r on i.exam_id=r.exam_id where tag='SQL' ) 
#union all
#(select tag as tid,uid,row_number() over (order by score desc)  from examination_info as i join exam_record as r on i.exam_id=r.exam_id where tag='算法' ))as t where ranking<=3

select tag,uid,ranking from
(select tag,uid,row_number() over(partition by tag order by max_score desc,min_score desc,uid desc) as ranking from
(select uid,tag,max(score) as max_score,min(score) as min_score from exam_record join examination_info using(exam_id) group by uid,tag) as t_uid_tag_score
)as t_tag_uid_rank
where ranking<=3

全部评论

相关推荐

10-27 02:29
已编辑
门头沟学院 嵌入式工程师
牛客72783561...:简历不是这么写的,你这两个项目只说了用到了什么技术,却没说取得了什么成果,在我看来这就是你自己做的一个demo,没有价值。你为什么不写你电赛国二的那个项目?
点赞 评论 收藏
分享
11-13 20:16
已编辑
厦门理工学院 软件测试
专业嗎喽:硕佬,把学校背景放后面几段,学校背景双非还学院,让人看了就不想往下看。 把实习经历和个人奖项放前面,用数字化简述自己实习的成果和掌握的技能,比如负责项目一次通过率90%,曾4次发现项目潜在问题风险为公司减少损失等等
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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