Nakheel Hotels bookings
Nakheel Hotels (fictional) · 7 tables · 35,882 rows · version 1
Two years (2024–2025) of hotel bookings plus reservations already made for early 2026: hotels, room types, rooms, about 4,000 guests, ~15,000 bookings (stays, cancellations and no-shows), extra services consumed during stays and guest reviews. Built for hospitality analytics: occupancy, ADR and RevPAR, seasonality (Ramadan and Hajj in Makkah and Madinah, summer in Abha and Taif, Riyadh Season), channel mix, cancellations, repeat guests and review scores. Amounts are in SAR.
The documentation is open to everyone. Querying this dataset in the playground is included with Formula Quest membership; lessons that use it follow their own access.
Relationships
Sample queries
SELECT channel, status, count(*) AS bookings
FROM bookings
GROUP BY channel, status
ORDER BY channel, bookings DESC;SELECT date_trunc('month', n.night)::date AS month,
count(*) AS room_nights,
sum(b.nightly_rate) AS room_revenue
FROM bookings b
CROSS JOIN LATERAL generate_series(b.check_in, b.check_out - 1, interval '1 day') AS n(night)
WHERE b.status IN ('checked_out', 'checked_in')
AND n.night < DATE '2026-01-01'
GROUP BY 1
ORDER BY 1;SELECT h.hotel_name, b.channel,
round(sum(b.total_amount) / sum(b.check_out - b.check_in), 2) AS adr
FROM bookings b
JOIN hotels h ON h.hotel_id = b.hotel_id
WHERE b.status = 'checked_out'
GROUP BY 1, 2
ORDER BY 1, 2;SELECT channel,
count(*) AS bookings,
round(100.0 * count(*) FILTER (WHERE status = 'cancelled') / count(*), 1) AS cancel_pct
FROM bookings
WHERE check_in <= DATE '2025-12-31'
GROUP BY channel
ORDER BY cancel_pct DESC;SELECT h.hotel_name, count(*) AS reviews, round(avg(r.rating), 2) AS avg_rating
FROM reviews r
JOIN bookings b ON b.booking_id = r.booking_id
JOIN hotels h ON h.hotel_id = b.hotel_id
GROUP BY h.hotel_name
ORDER BY avg_rating DESC;Data dictionary
hotels
7 rows · primary key (hotel_id)Hotels in the group.
| Column | Type | Null? | Key | Description |
|---|---|---|---|---|
| hotel_id | integer | no | PK | Unique hotel number. |
| hotel_name | text | no | unique | Hotel name. |
| city | text | no | City (Mecca = Makkah, Medina = Madinah). | |
| star_rating | smallint | no | Official star rating. | |
| rooms_count | integer | no | Number of rooms built (including rooms out of service). | |
| opened_on | date | no | Opening date (Taif opened during the data period). |
room_types
24 rows · primary key (room_type_id)Room categories offered at each hotel, with the published base rate.
| Column | Type | Null? | Key | Description |
|---|---|---|---|---|
| room_type_id | integer | no | PK | Unique room type number. |
| hotel_id | integer | no | hotels.hotel_id | Hotel. |
| room_type_name | text | no | standard, deluxe, suite or family. | |
| capacity | integer | no | Maximum guests (adults + children). | |
| base_rate | numeric(12,2) | no | Published base rate per night in SAR; actual rates move with demand and channel. |
rooms
69 rows · primary key (room_id)Physical rooms.
| Column | Type | Null? | Key | Description |
|---|---|---|---|---|
| room_id | integer | no | PK | Unique room number across the group. |
| hotel_id | integer | no | hotels.hotel_id | Hotel. |
| room_type_id | integer | no | room_types.room_type_id | Room type of this room. |
| room_number | text | no | Number on the door (floor + sequence). | |
| floor | smallint | no | Floor. | |
| out_of_service_since | date | yes | Date the room was taken out of service (renovation). NULL = in service. |
guests
3,968 rows · primary key (guest_id)Guest profiles. One person can have more than one profile.
| Column | Type | Null? | Key | Description |
|---|---|---|---|---|
| guest_id | integer | no | PK | Unique guest profile number. |
| first_name | text | no | First name (fictional). | |
| last_name | text | no | Family name (fictional). | |
| text | yes | Email address. NULL when not given; not unique (duplicate profiles share it). | ||
| nationality_group | text | no | Broad nationality group (Saudi, GCC, Other Arab, South Asian, Southeast Asian, East Asian, European, Other). | |
| loyalty_tier | text | yes | silver, gold or platinum. NULL = not a loyalty member. | |
| created_at | timestamp | no | When the profile was created. |
bookings
15,356 rows · primary key (booking_id)Reservations. A booking covers the nights from check_in up to (not including) check_out, at one nightly rate.
| Column | Type | Null? | Key | Description |
|---|---|---|---|---|
| booking_id | integer | no | PK | Unique booking number (ascending with booking time). |
| guest_id | integer | no | guests.guest_id | Guest who made the booking. |
| hotel_id | integer | no | hotels.hotel_id | Hotel. |
| room_type_id | integer | no | room_types.room_type_id | Room type booked (and paid for). |
| room_id | integer | yes | rooms.room_id | Room assigned at check-in. NULL for cancelled, no-show and future (confirmed) bookings. |
| booked_at | timestamp | no | When the booking was made. | |
| check_in | date | no | Arrival date (first night). | |
| check_out | date | no | Departure date (the night before is the last night). | |
| adults | integer | no | Number of adults. | |
| children | integer | no | Number of children. | |
| channel | text | no | direct (website/phone), ota (online travel agency), corporate (company agreement, discounted) or walk_in. | |
| status | text | no | Status on 2025-12-31: confirmed (future arrival), checked_in (in house), checked_out, cancelled or no_show. | |
| nightly_rate | numeric(12,2) | no | Room rate per night in SAR (0 = complimentary). | |
| total_amount | numeric(12,2) | no | nightly_rate × nights: the booked room value. Not revenue for cancelled or no-show bookings. Excludes services. | |
| cancelled_at | timestamp | yes | When the booking was cancelled. NULL unless status = 'cancelled'. |
booking_services
12,800 rows · primary key (booking_service_id)Extra services charged to a stay (dining, spa, laundry, airport transfers).
| Column | Type | Null? | Key | Description |
|---|---|---|---|---|
| booking_service_id | integer | no | PK | Unique charge number. |
| booking_id | integer | no | bookings.booking_id | The stay charged. |
| service_type | text | no | dining, spa, laundry or airport_transfer. | |
| service_date | date | no | Date of the charge (within the stay). | |
| amount | numeric(12,2) | no | Amount charged in SAR. |
reviews
3,658 rows · primary key (review_id)Guest reviews, at most one per stay.
| Column | Type | Null? | Key | Description |
|---|---|---|---|---|
| review_id | integer | no | PK | Unique review number. |
| booking_id | integer | no | bookings.booking_idunique | The stay reviewed. |
| rating | smallint | no | Overall rating from 1 (worst) to 10 (best). | |
| posted_on | date | no | Date the review was posted. |