select a.room_id, room_name, count(distinct user_id) as user_count from user_view_tb a join room_info_tb b on a.room_id=b.room_id where in_time<='23:59:59' and out_time>='23:00:00' group by a.room_id, room_name order by user_count desc

select a.room_id, room_name, count(distinct user_id) as user_count from user_view_tb a join room_info_tb b on a.room_id=b.room_id where in_time<='23:59:59' and out_time>='23:00:00' group by a.room_id, room_name order by user_count desc