select ct.user_id, gt. room_id, gt.room_type, datediff(checkout_time,checkin_time) days from guestroom_tb as gt inner join checkin_tb as ct on gt.room_id=ct.room_id where date(checkin_time)='2022-6-12'and datediff(checkout_time,checkin_time)>=2 order by days ,room_id,user_id desc datediff函数用于获取两个...