Occupancy Rate per Room
Medium
Hotel & Booking Systems
For the period 2026-07-01 to 2026-07-10 (10 nights), return each room and the percentage of nights booked, rounded to 2 decimals. All bookings lie inside the period and do not overlap within a room. Order by room.
Table schema
Bookings(id INT PRIMARY KEY, room INT, check_in DATE, check_out DATE)Sample data
id | room | check_in | check_out
3 | 102 | 2026-07-02 | 2026-07-04
5 | 103 | 2026-07-06 | 2026-07-10
6 | 103 | 2026-07-01 | 2026-07-03
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.