Write a SQL query using window functions to rank properties by price within each city and return the top 3 per city.
Use the properties table. Exclude properties without a price and make the ordering deterministic by using property_id as the tie-breaker.
property_id, city, property_name, price, and price_rank.city, price_rank, and property_id.| Column | Type | Description |
|---|---|---|
| property_idPK | INT | Unique property identifier |
| city | VARCHAR(100) | City where the property is located |
| property_name | VARCHAR(150) | Listing name or short property description |
| price | DECIMAL(12,2) | Listing price in US dollars |