题解 | 被重复观看次数最多的3个视频

被重复观看次数最多的3个视频

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

select cid, pv, rk
from (
    select t2.cid,
    pv,
    row_number() over (order by pv desc, release_date desc) rk
    from (
        select cid,
        sum(num) pv
        from (
            select cid, uid, count(*) num
            from play_record_tb
            group by cid, uid
            having count(*)>1
        ) t1
        group by cid
    ) t2
    join course_info_tb c
    on t2.cid=c.cid
) t
where rk<=3
order by rk

全部评论

相关推荐

找工作勤劳小蜜蜂:矛盾是没有实习,就是没实战经验,公司不想要,公司不要,你就没有实习,你就进入死循环,另外你的项目不是社会现在有大量岗位存在行业用的,云存储人员早就饱和。
点赞 评论 收藏
分享
zaakfung:26届不应该春招吗 为啥还实习
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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