Independent Company Challenges
Airbnb-style SQL challenges
Independent Airbnb-style marketplace, booking, listing, payment, review, and guest analytics SQL practice.
These independent exercises use Airbnb-relevant business domains; they are not claimed to be questions used by Airbnb, and this site is not affiliated with the company.
- Exercises
- 25
- Difficulty
- Beginner to Hard
What this collection tests
Skills and query patterns
Marketplace supply, bookings, pricing, guest behavior, payments, review quality, and demand analytics
Curated exercises
Choose a challenge
Work in the live editor where supported. Advanced guided labs state their engine boundary before you open the workspace.
- Challenge 1Beginner
Guest Directory
Return user_id, country, and signup_date for all users, ordered by user_id.
- Date analysis
- Sorting
SQLite live
Open challenge → - Challenge 2Beginner
Listing Catalog
Return listing_id, city, and price_per_night for all listings, ordered by listing_id.
- Sorting
SQLite live
Open challenge → - Challenge 3Beginner
US Guests
Return user_id and signup_date for users in the US (country = 'US'), ordered by user_id.
- Filtering
- Sorting
SQLite live
Open challenge → - Challenge 4Beginner
Extended Stays
Return booking_id, user_id, listing_id, and nights for bookings with more than 3 nights, ordered by booking_id.
- Filtering
- Sorting
SQLite live
Open challenge → - Challenge 5Beginner
Booking Log
Return booking_id, listing_id, nights, and booking_date for all bookings, ordered by booking_id.
- Date analysis
- Sorting
SQLite live
Open challenge → - Challenge 6Easy
Listings by Price Tier
Return listing_id, city, price_per_night, and price_tier. Budget is under 100, Mid-range is 100 through 170, and Premium is above 170. Order by price_per_night descending, then listing_id.
- CASE expressions
- Sorting
SQLite live
Open challenge → - Challenge 7Easy
Guest Booking History
Return user_id, country, booking_id, listing_id, and nights for all guests who have bookings, ordered by user_id then booking_id.
- Joins
- Sorting
SQLite live
Open challenge → - Challenge 8Easy
Bookings per Guest
Return user_id and total_bookings for every registered user, including users with zero bookings. Order by total_bookings descending, then user_id.
- Joins
- Aggregation
- Sorting
SQLite live
Open challenge → - Challenge 9Easy
Bookings by City
Return city and booking_count for every catalog city, including cities with no bookings. Order by booking_count descending, then city.
- Joins
- Aggregation
- Sorting
SQLite live
Open challenge → - Challenge 10Easy
Nightly Price Leaderboard
Return listing_id, city, and price_per_night for all listings ordered by price_per_night descending, then listing_id.
- Sorting
SQLite live
Open challenge → - Challenge 11Medium
Average Rating per Listing
Return listing_id, city, and avg_rating rounded to 2 decimal places for each reviewed listing. Order by avg_rating descending, then listing_id.
- Joins
- Aggregation
- Numeric functions
SQLite live
Open challenge → - Challenge 12Medium
Revenue per Listing
Return listing_id, city, and total_revenue for each listing that has received payments. Order by total_revenue descending, then listing_id.
- Joins
- Aggregation
- Sorting
SQLite live
Open challenge → - Challenge 13Medium
Guest Total Spend
Return user_id, country, and total_spent for each guest with paid bookings. Order by total_spent descending, then user_id.
- Joins
- Aggregation
- Sorting
SQLite live
Open challenge → - Challenge 14Medium
Unpaid Bookings
Return booking_id, user_id, listing_id, nights, and booking_date for all bookings with no matching payment, ordered by booking_id.
- Subqueries
- Filtering
- Sorting
SQLite live
Open challenge → - Challenge 15Medium
Guests Who Explored Multiple Listings
Return user_id and unique_listings for guests with more than one distinct listing. Order by unique_listings descending, then user_id.
- Aggregation
- HAVING
- Sorting
SQLite live
Open challenge → - Challenge 16Medium
City Revenue Dashboard
Return city, total_revenue, and paid_bookings for each city with payments. Order by total_revenue descending, then city.
- Joins
- Aggregation
- Sorting
SQLite live
Open challenge → - Challenge 17Hard
High-Value Guests
Return user_id and total_spent for guests whose total spend is above the average per-guest total spend. Order by total_spent descending, then user_id.
- Joins
- Subqueries
- Aggregation
SQLite live
Open challenge → - Challenge 18Hard
Top Revenue Listing
Return listing_id, city, and total_revenue for the single highest-revenue listing. Break equal revenue by the lower listing_id.
- Window functions
- Joins
- Subqueries
SQLite live
Open challenge → - Challenge 19Hard
Listing Demand Summary
Return listing_id, city, price_per_night, total_bookings, and total_nights for all listings, ordered by total_bookings descending then listing_id.
- Joins
- Aggregation
- NULL handling
SQLite live
Open challenge → - Challenge 20Hard
Repeat Bookers
Return user_id, listing_id, and times_booked for repeated pairs. Order by frequency descending, then user_id and listing_id.
- Subqueries
- Aggregation
- Filtering
SQLite live
Open challenge → - Challenge 21Hard
City Performance Scorecard
Return city, total_revenue, and avg_rating for each city that has both payment and review facts. Order by total_revenue descending, then city.
- Joins
- Subqueries
- Aggregation
SQLite live
Open challenge → - Challenge 22Hard
Top 3 Most Active Guests
Return user_id, country, and booking_count for the top 3 guests by booking volume, ordered by booking_count descending then user_id ascending.
- Joins
- Aggregation
- Sorting
SQLite live
Open challenge → - Challenge 23Hard
Average Stay Length by City
Return city and avg_nights (average nights per booking) for each city, ordered by avg_nights descending then city alphabetically.
- Joins
- Subqueries
- Aggregation
SQLite live
Open challenge → - Challenge 24Hard
Monthly Booking Trend
Return month (YYYY-MM), bookings (count that month), total_nights (sum of nights that month), and cumulative_bookings (running total). Order by month ascending.
- Window functions
- Subqueries
- Aggregation
SQLite live
Open challenge → - Challenge 25Hard
Traveller Tiers
Return user_id, total_nights, and traveller_tier for every user. Use three ordered buckets labelled Occasional, Regular, and Frequent. Order by total_nights descending, then user_id.
- Window functions
- Joins
- Subqueries
SQLite live
Open challenge →
Attempt
Write a query or design from the brief before opening any hints.
Validate
Run it against the included dataset and inspect the output.
Explain
Compare the verified answer and explain each choice aloud.
Learn before practicing Airbnb
Strengthen your understanding with these targeted learning topics:
Continue practicing
Explore related company challenges
Uber
Independent Uber-style mobility marketplace SQL practice covering trips, drivers, riders, pricing, payments, and promotions.
Amazon
Independent Amazon-style e-commerce, warehouse, inventory, and customer analytics SQL practice.
Meta
Independent Meta-style social-product, engagement, content, community, messaging, and advertising SQL practice.
Return to the complete interview preparation experience.