题解 | #牛客直播开始时各直播间在线人数#
牛客直播开始时各直播间在线人数
http://www.nowcoder.com/practice/bdd30e83d47043c99def6d9671bb6dbf
select a.course_id,a.course_name,count(distinct b.user_id) as online_pv
from course_tb a
left join attend_tb b on a.course_id=b.course_id
where time(b.in_datetime)<='19:00:00'
group by 1,2 order by 1