Write a SQL query to analyze daily sales by location and identify the top-performing HMSHost stores over the last 30 days.
Use the provided stores and sales tables. Treat the top-performing stores as the top three by total sales, including ties. Include sales from the last 30 days through the current date.
location_name, store_id, sales_date, daily_sales, total_sales, and store_rankstore_rank, store_id, and sales_date descending| Column | Type | Description |
|---|---|---|
| store_idPK | INT | Unique HMSHost store identifier |
| store_name | VARCHAR(100) | HMSHost store name |
| location_name | VARCHAR(150) | Airport or venue location |
| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique sales record identifier |
| store_id | INT | Store associated with the sale |
| sale_date | DATE | Date on which the sale occurred |
| sale_amount | DECIMAL(10,2) | Sales revenue for the record |