Write a SQL query to analyze guest reservations by Exclusive Resorts resort location and month, including total bookings, cancellation rate, and average stay length.
Use reservations with non-null check-in and check-out dates. Treat reservations with status cancelled as cancellations, and assign the month from the check-in date.
Unknownresort_location, reservation_month, total_bookings, cancellation_rate, and average_stay_lengthcancellation_rate as a percentage rounded to two decimals, and average_stay_length in days rounded to two decimalsresort_location, then reservation_month| Column | Type | Description |
|---|---|---|
| resort_idPK | INT | Unique resort identifier |
| location | VARCHAR(100) | Exclusive Resorts resort location |
| Column | Type | Description |
|---|---|---|
| reservation_idPK | INT | Unique reservation identifier |
| resort_id | INT | Referenced resort identifier |
| check_in_date | DATE | Guest arrival date |
| check_out_date | DATE | Guest departure date |
| status | VARCHAR(20) | Reservation status |