题解 | #牛客直播开始时各直播间在线人数#
牛客直播开始时各直播间在线人数
http://www.nowcoder.com/practice/bdd30e83d47043c99def6d9671bb6dbf
select
ab.course_id,
ct.course_name,
count(ab.user_id) online_num
from
attend_tb ab inner join course_tb ct on ab.course_id = ct.course_id
where date_format(in_datetime, "%T") <= "19:00:00"
group by course_id,course_name
order by course_id