Demand Planning & Forecasting Analytics · Mission 12 of 30Medium

Intermittent SKU detection

Conditional COUNT

The Brief

Devi IyerDemand Analystdemand-planning

Find SKUs where 50%+ periods have zero actuals. Show sku_id and zero_periods.

You'll practice

WHERE

Tables & columns available

fact_actualsfact6 columns
ColumnTypeKey
actual_idINTPK
sku_idINTFK → dim_skus
location_idINTFK → dim_locations
period_dateTEXT
units_soldINT
revenueREAL

Hints (3)

Each hint you reveal reduces the XP you can earn. Try the query first.

Hint 1

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.

Hint 2

SUM CASE units_sold = 0.

Hint 3

HAVING zero_periods >= total/2.