Your question is SQL Top 5 Stores by Sales Growth. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Sherwin-Williams operations leadership wants to identify stores with the strongest recent sales increases. Write a PostgreSQL query that compares each store's monthly completed sales with the preceding month.
| Column | Type | Description |
|---|---|---|
| store_idPK | INT | Unique Sherwin-Williams store identifier |
| store_name | VARCHAR(100) | Store display name |
| region | VARCHAR(50) | Operating region |
| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique sales record identifier |
| store_id | INT | Store associated with the sale |
| sale_date | DATE | Date of the transaction |
| net_sales | DECIMAL(12,2) | Net sales amount |
| sale_status | VARCHAR(20) | Transaction processing status |