Write a query to find the top 3 most booked hotels in each city for the last 30 days.
Count booking records whose booking date falls within the 30-day period ending today. Include only hotels represented in the hotel table. If a city has fewer than three qualifying hotels, return all available hotels.
city, hotel_id, hotel_name, booking_count, and hotel_rank.hotel_id.| Column | Type | Description |
|---|---|---|
| hotel_idPK | INT | Unique hotel identifier |
| hotel_name | VARCHAR(150) | Hotel display name |
| city | VARCHAR(100) | City where the hotel is located |
| Column | Type | Description |
|---|---|---|
| booking_idPK | INT | Unique booking identifier |
| hotel_id | INT | Hotel associated with the booking |
| booked_at | DATE | Date on which the booking was made |