Search ⌘K
Airbnb
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...

Foundations Track
Easy
15 min
query basics
aggregation
filtering

Company labels are directional practice context, not official interview guidance.

Timer 00:00
Back to practice

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.

Prereq: query basics
Prereq: filtering

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 INT
venue_id INT
stars INT
review_idvenue_idstars
1105
2104
3105
4114
5114
6114
7125
8125
9124
10135
11134
Editor
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.