Demand Planning & Forecasting Analytics · Mission 6 of 30Easy

MAPE per SKU

AVG of absolute percentage error

The Brief

Lena ParkDemand Planning Managerdemand-planning

Compute MAPE per SKU using STATISTICAL forecast vs actuals. Show sku_id and mape.

You'll practice

SQL practice

Tables & columns available

fact_actualsfact6 columns
ColumnTypeKey
actual_idINTPK
sku_idINTFK → dim_skus
location_idINTFK → dim_locations
period_dateTEXT
units_soldINT
revenueREAL
fact_forecastsfact7 columns
ColumnTypeKey
forecast_idINTPK
sku_idINTFK → dim_skus
location_idINTFK → dim_locations
version_idINTFK → dim_forecast_versions
forecast_period_dateTEXT
forecast_generated_dateTEXT
forecast_qtyINT

Hints (3)

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

Hint 1

MAPE is mean absolute percentage error: |error| as a fraction of actual, averaged. You'll need both fact tables aligned on the same SKU+period.

Hint 2

Filter version_id = 1 (STATISTICAL).

Hint 3

AVG(ABS(actual - forecast) / actual).