题解 | #牛客直播开始时各直播间在线人数#
牛客直播开始时各直播间在线人数
https://www.nowcoder.com/practice/bdd30e83d47043c99def6d9671bb6dbf
select course_id, course_name, count(distinct user_id) from attend_tb join course_tb using (course_id) where in_datetime <= substring(course_datetime, 1, 15) and out_datetime >= substring(course_datetime, 1, 15) group by course_id, course_name order by course_id;