Unusually expensive listings
HardAirbnbstddevz-scorejoins· 40 XP
Airbnb's pricing team flags listings priced far above similar places, because they rarely get booked. "Similar" means the same city and room type.
Find listings whose nightly price is more than 2 standard deviations above the average for their city and room type. Ignore groups with fewer than 5 listings.
Expected output
- Any row order
Example of the shape (made-up values):
| listing_id | city | room_type | price_per_night |
|---|---|---|---|
| 211 | Paris | Private room | 155.00 |
Hints, the later questions and the answer come with Pro.
Write your query here. Ctrl + Enter submits.