题解 | 短视频直播间晚上11-12点之间各直播间的在线人数


with temp as (
    select 
        room_id,
        count(distinct user_id ) as user_count
        from user_view_tb 
        where in_time <= '23:59:59' AND out_time >= '23:00:00'
        group by room_id)

select 
    a.room_id,
    room_name,
    user_count
    from temp a join room_info_tb b
     on a.room_id=b.room_id order by user_count desc 


全部评论

相关推荐

不愿透露姓名的神秘牛友
2024-12-14 14:04
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务