select c.user_id,c.room_id,g.room_type,datediff(checkout_time,checkin_time) days from checkin_tb c left join guestroom_tb g on c.room_id=g.room_id where c.checkin_time>='2022-06-12' and datediff(checkout_time,checkin_time) >=2 order by days asc,room_id asc,user_id desc; 1、datediff()大的时间在前面2、从6...