select user_id,c.room_id,room_type,datediff(checkout_time,checkin_time) daysfrom checkin_tb c left join guestroom_tb g on c.room_id = g.room_idwhere checkin_time >= '2022-06-12' and datediff(checkout_time,checkin_time) > 1order by user_id