题解 | #查询每天刷题通过数最多的前二名用户id和刷题数#

查询每天刷题通过数最多的前二名用户id和刷题数

https://www.nowcoder.com/practice/b9cc0d5047f94bc0a661c5a0a230b9cd

select
    t.date,
    t.user_id,
    t.pass_count
from
    (select
        date,
        user_id,
        pass_count,
        row_number() over(partition by date order by pass_count desc) as pass_rank
    from
        questions_pass_record) t
where
    t.pass_rank < 3
order by 
    t.date,t.pass_count desc

全部评论

相关推荐

昨天 10:39
门头沟学院 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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