Write a SQL query to analyze store performance by location, including total sales, average transaction value, and month-over-month growth.
Use the provided store and transaction data. Include completed transactions only, preserve stores without completed sales, and treat missing monthly sales as zero.
location, month_start, total_sales, average_transaction_value, and month_over_month_growth_pct.location, then month_start. Growth is NULL when there is no prior month or the prior month has zero sales.| Column | Type | Description |
|---|---|---|
| store_idPK | INT | Unique store identifier |
| location | VARCHAR(100) | Store location |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| store_id | INT | Store where the transaction occurred |
| transaction_date | DATE | Transaction date |
| amount | DECIMAL(12,2) | Transaction sales amount |
| status | VARCHAR(20) | Transaction processing status |