โจ Daily SQL Problems
โจ Real-World Scenarios
โจ Complete Solutions
โจ Interview Ready
Click this link to get the CSV files:
Get Dataset (3 tables: bookings, rooms, guests)You work at Grand Plaza Hotel with 50 rooms. Management wants to analyze booking patterns to optimize pricing and staffing.
| booking_id | guest_id | room_id | check_in_date | check_out_date |
|---|---|---|---|---|
| B001 | G101 | R201 | 2024-01-05 | 2024-01-08 |
| b002 | G102 | r305 | 06/01/2024 | 2024-01-09 |
| B003 | g103 | R201 | 2024/01/10 | 12-01-2024 |
| B004 | G104 | R102 | 2024-01-07 | NULL |
| room_id | room_type | price_per_night | floor_number |
|---|---|---|---|
| R201 | Deluxe | 150.00 | 2 |
| r305 | SUITE | 250.00 | 3 |
| R102 | standard | 100.00 | 1 |
| R405 | Suite | 250.00 | 4 |
| guest_id | guest_name | country |
|---|---|---|
| G101 | john smith | USA |
| g102 | MARIA GARCIA | spain |
| G103 | David Chen | China |
| G104 | sarah johnson | CANADA |
Download full dataset above for complete data (25 rows per table)
Analyze hotel booking data to identify trends, calculate revenue, and validate guest information.
๐ก INNER JOIN, DATEDIFF, CASE, GROUP BY, SUM, ORDER BY!
Download the PDF for complete solution with hints!
Master hotel analytics
Build revenue tracking systems
Analyze booking trends with SQL
Day 21 coming tomorrow!
Rahul Kanche โ exploring data, decoding clarity!