Airbnb
Foundations Track · Easy · 15 min
Top Rated Venues
Return the top two venue_id values with the highest average star rating, considering only venues that have at least three reviews. Output venue_id and avg_st...
Company labels are directional practice context, not official interview guidance.
Objective
Practice query basics through a Airbnb-tagged business scenario.
Approach
Use this track to lock in clean query structure, basic filtering logic, and confidence with grouped output.
Company context
Company labels are directional practice context, not official interview guidance.
Return the top two venue_id values with the highest average star rating, considering only venues that have at least three reviews. Output venue_id and avg_stars, ordered by avg_stars descending then venue_id.
venue_reviews
| review_id | venue_id | stars |
|---|---|---|
| 1 | 10 | 5 |
| 2 | 10 | 4 |
| 3 | 10 | 5 |
| 4 | 11 | 4 |
| 5 | 11 | 4 |
| 6 | 11 | 4 |
| 7 | 12 | 5 |
| 8 | 12 | 5 |
| 9 | 12 | 4 |
| 10 | 13 | 5 |
| 11 | 13 | 4 |
SQL workspace
Run queries against the protected question data, then submit once the result shape looks right.
Sign in to run SQL
Create a free account or sign in before running queries against protected question data.