Your question is SQL Ranking by Weekly 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.
Domino's Operations leadership wants to identify stores with the strongest week-over-week sales improvement. Write a PostgreSQL query using the stores and weekly_store_sales tables.
Calculate growth from the week beginning 2025-01-27 to the week beginning 2025-02-03.
| Column | Type | Description |
|---|---|---|
| store_idPK | INTEGER | Unique Domino's store identifier |
| store_name | VARCHAR(100) | Store display name |
| region | VARCHAR(50) | Operations region |
| Column | Type | Description |
|---|---|---|
| sales_idPK | INTEGER | Unique weekly sales record |
| store_id | INTEGER | Store associated with the sales record |
| week_start | DATE | First day of the sales week |
| sales_amount | NUMERIC(12,2) | Total store sales for the week |