Demand Planning & Forecasting Analytics · Mission 9 of 30Easy

Forecast attainment

Ratio of actuals to forecast

The Brief

Lena ParkDemand Planning Managerdemand-planning

Compute attainment = actuals / forecast per SKU (STATISTICAL). Show sku_id and attainment_pct.

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

Forecast attainment is the ratio of total actual to total forecast per SKU. Aggregate both sides separately.

Hint 2

SUM(actual)/SUM(forecast) per sku.

Hint 3

Force float.