Write a SQL query to calculate weekly sales, labor cost, and food cost by store, and flag stores whose labor percentage exceeds a threshold at SSP Group.
Use the week from 2025-01-06 through 2025-01-12 and a labor threshold of 30%.
store_id, store_name, week_start, weekly_sales, weekly_labor_cost, weekly_food_cost, labor_percentage, and labor_over_threshold.store_id ascending.| Column | Type | Description |
|---|---|---|
| store_idPK | INT | Unique SSP Group store identifier |
| store_name | VARCHAR(100) | SSP Group store name |
| Column | Type | Description |
|---|---|---|
| financial_idPK | INT | Unique daily financial record identifier |
| store_id | INT | Store associated with the daily financial record |
| business_date | DATE | Trading date for the financial record |
| sales_amount | NUMERIC(12,2) | Daily sales amount |
| labor_cost | NUMERIC(12,2) | Daily labor cost |
| food_cost | NUMERIC(12,2) | Daily food cost |