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

每类试卷得分前3名

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

select *
from (
    select tag as tid,
           uid,
           row_number() over (partition by tag order by MAX(score) desc,min(score) desc ,uid desc) ranking
    from exam_record
     join examination_info ei on exam_record.exam_id = ei.exam_id
    group by tag, uid
     )t
where ranking <=3;

全部评论

相关推荐

12-03 21:22
武汉大学 Java
点赞 评论 收藏
分享
10-16 15:48
算法工程师
点赞 评论 收藏
分享
程序员牛肉:可以说含金量不如王者荣耀省标。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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