select user_id ,room_id ,room_type ,datediff(checkout_time,checkin_time) as days from checkin_tb left join guestroom_tb using(room_id) where date(checkin_time) >= '2022-06-12' and datediff(checkout_time,checkin_time) >=2 order by 4,2,1 desc ;