Write a SQL query to analyze weekly store performance by joining sales, labor, and inventory tables and calculating key operational metrics.
Use the provided tables and include January 2025 activity. Combine records at the store-week level and preserve weeks that appear in any source table.
store_id, then week_start.store_id, week_start, weekly_sales, transaction_count, units_sold, labor_hours, sales_per_labor_hour, sell_through_rate, ending_inventory_units, prior_week_sales, and sales_change_pct.NULL when a metric cannot be calculated because its denominator or source data is unavailable.| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique sale record identifier |
| store_id | VARCHAR(10) | Ross Stores store identifier |
| sale_date | DATE | Date of the sales activity |
| transaction_count | INT | Number of customer transactions |
| units_sold | INT | Units sold during the record period |
| net_sales | DECIMAL(12,2) | Net sales dollars |
| Column | Type | Description |
|---|---|---|
| labor_idPK | INT | Unique labor record identifier |
| store_id | VARCHAR(10) | Ross Stores store identifier |
| work_date | DATE | Date labor was recorded |
| labor_hours | DECIMAL(8,2) | Hours worked at the store |
| Column | Type | Description |
|---|---|---|
| inventory_idPK | INT | Unique inventory snapshot identifier |
| store_id | VARCHAR(10) | Ross Stores store identifier |
| snapshot_date | DATE | Date of the inventory snapshot |
| beginning_units | INT | Units available at the beginning of the period |
| received_units | INT | Units received during the period |
| ending_units | INT | Units available at the end of the period |