题解 | 牛客直播开始时各直播间在线人数

牛客直播开始时各直播间在线人数

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

#19;00 在线人数
#per subject
#asc course id

select ct.course_id, ct.course_name,count(distinct at.user_id) as online_num
from attend_tb at join course_tb ct on at.course_id=ct.course_id
where time(at.in_datetime)<='19:00:00' and time(at.out_datetime)>='19:00:00'
group by ct.course_id, ct.course_name

全部评论

相关推荐

深夜焦虑难以入眠:直通终面也很稳了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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