select b.user_id ,b.room_id ,a.room_type ,day(checkout_time)-day(checkin_time) as days from checkin_tb as b left join guestroom_tb as a on b.room_id=a.room_id where b.checkin_time >='2022-06-12' having days>=2 order by days,b.room_id,b.user_id desc