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

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

https://www.nowcoder.com/practice/38f5febc9dac4e9e84ed5891a3e4ca05


select
    t1.room_id,
    t1.room_name,
    count(distinct t1.user_id) as user_count
from (

select
    *
from user_view_tb as a
left join room_info_tb b using(room_id)

) t1
where t1.in_time <= '23:59:59' and t1.out_time >= '23:00:00'
group by t1.room_id,t1.room_name
order by user_count desc


全部评论

相关推荐

自来熟的放鸽子能手面...:这个不一定,找hr跟进一下
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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