SELECT
  t.user_id,
  t.room_id,
  g.room_type,
  datediff(checkout_time,checkin_time) days
  from 
  checkin_tb t 
  join guestroom_tb g on t.room_id=g.room_id
  where datediff(checkout_time,checkin_time) >=2
  and date(checkin_time)="2022-06-12"
order by 
days,t.room_id,t.user_id desc