101
0/304
Loading content...
A real estate intelligence team wants to identify markets that are priced above the country-wide baseline.
Table: Listings
Task: Find every city whose average listing price is strictly greater than the national average listing price.
Definitions:
Return exactly one column in this order:
Sort the output by city in ascending order.
Supported submission environments:
Listings:
| listing_id | city | price |
|------------|--------------|---------|
| 113 | LosAngeles | 7560386 |
| 136 | SanFrancisco | 2380268 |
| 92 | Chicago | 9833209 |
| 60 | Chicago | 5147582 |
| 8 | Chicago | 5274441 |
| 79 | SanFrancisco | 8372065 |
| 37 | Chicago | 7939595 |
| 53 | LosAngeles | 4965123 |
| 178 | SanFrancisco | 999207 |
| 51 | NewYork | 5951718 |
| 121 | NewYork | 2893760 |[
{"city":"Chicago"},
{"city":"LosAngeles"}
]The national average is 6122059.45. Chicago and LosAngeles have higher city averages than that baseline.
Listings:
| listing_id | city | price |
|------------|--------|-------|
| 1 | Alpha | 10 |
| 2 | Alpha | 20 |
| 3 | Beta | 15 |[]Alpha average is 15 and Beta average is 15, exactly equal to national average 15, so no city qualifies.
Listings:
| listing_id | city | price |
|------------|--------|-------|
| 101 | Austin | 300 |
| 102 | Austin | 500 |
| 103 | Boston | 100 |
| 104 | Boston | 200 |
| 105 | Cairo | 600 |[
{"city":"Austin"},
{"city":"Cairo"}
]National average is 340. Austin average is 400 and Cairo average is 600, both above national; Boston is below.
Constraints