Conditional COUNT
Find SKUs where 50%+ periods have zero actuals. Show sku_id and zero_periods.
| Column | Type | Key |
|---|---|---|
| actual_id | INT | PK |
| sku_id | INT | FK → dim_skus |
| location_id | INT | FK → dim_locations |
| period_date | TEXT | |
| units_sold | INT | |
| revenue | REAL |
Each hint you reveal reduces the XP you can earn. Try the query first.
Intermittent demand means a SKU has zero sales in a meaningful share of its periods. You'll need a conditional count and a HAVING threshold.
SUM CASE units_sold = 0.
HAVING zero_periods >= total/2.