SQL interview questions · By company
Airbnb SQL interview questions
For data analyst and data scientist roles: what candidates report, and how to practice for it.
SQLRep isn't affiliated with or endorsed by Airbnb. This guide summarizes public candidate reports and prep guides (sources below, checked November 2026). The practice questions are original, written in the reported style; they aren't Airbnb's actual questions. Processes change, so confirm details with your recruiter.
What candidates report about the process
- Most public material is compiled prep content; few first-hand analyst reports are available.
- Expect marketplace metrics on both sides: guests and hosts.
SQL topics that come up
- Groups with zero activity (anti-joins from a lookup table)
- Occupancy and pricing metrics
- Host responsiveness and review thresholds
Practice the reported patterns
Each one runs in real PostgreSQL in your browser, with feedback on what's wrong.
- Neighborhoods with no active listingsReturn city, neighborhood (its name) and listings (how many listings it has in any status, 0 if none) for every neighborhood with no active listing. Sort by city, then neighborhood.Pattern: LEFT JOIN · COUNT FILTER · NOT IN and NULLEasyPro
- Host response time and the 1-hour reply rateFor each host with inquiries, return host (their name), inquiries (all of them), avg_response_hours (average of responded_at - sent_at in hours over answered inquiries, rounded to 2) and within_1h_pct (inquiries answered within 60 minutes, inclusive, as a % of all inquiries, rounded to 1; unanswered ones count as not within the hour). Sort by within_1h_pct descending, then host.Pattern: Interval math · AVG over NULLs · COUNT FILTERMediumPro
- Host occupancy rateFor June 2025, return host_id, nights_available (total across the host's listings), nights_booked (nights of confirmed bookings that fall in June; a stay covers the nights from check_in up to check_out - 1, and a stay that starts before June or ends after it counts only its June nights) and occupancy_pct (nights_booked as a percentage of nights_available, ROUND(..., 1)). Include every host, with 0 nights_booked when they had no June bookings. Sort by occupancy_pct highest first, then host_id.Pattern: Aggregate before joining · clipping stays to a monthHardPro
- Recent rating with a minimum review countUsing reviews from the 30 days ending 2025-06-30 (2025-06-01 through 2025-06-30, inclusive), return listing_id, title, rated_reviews (reviews in that window with a rating) and avg_rating (ROUND(AVG(rating), 2)) for listings with at least 3 rated reviews in the window. Reviews with a NULL rating are comments only and don't count. Sort by avg_rating highest first, then listing_id.Pattern: Date window · HAVING · COUNT(column)MediumPro
- Users who never subscribedReturn the username of every user with no subscription, sorted by username.Pattern: LEFT JOIN · IS NULLMediumFree
- Overbooked nightsA booking holds one room each night from check_in up to the night before check_out. Using every booking that isn't cancelled (stayed or upcoming), find hotel nights with more bookings than the hotel has rooms. Return hotel (name), night, bookings, rooms and rooms_short (bookings - rooms). Sort by night, then hotel.Pattern: generate_series per booking · HAVING against a joined capacityHardPro
- ADR and RevPAR per hotel per monthCount each completed stay's nights (status 'stayed'; every night from check_in up to the night before check_out) in the month they fall in, keeping nights from 2025-01-01 to 2025-03-31. For each hotel and month with at least one night sold, return hotel (name), month (as 'YYYY-MM'), nights_sold, room_revenue (sum of nightly_rate), adr (room_revenue / nights_sold) and revpar (room_revenue / (rooms × days in that month)), both rounded to 2 decimals. Sort by hotel, then month.Pattern: Nights via generate_series · days in month · two denominatorsHardPro
Tip: Marketplace questions often hide a denominator choice (all listings or active listings?). Ask before you compute.
Sources
Airbnb is a trademark of its owner, used here only to identify the company the reports are about.