Dense full-outer aggregation across two dimensions (cost_center × month)
I need a heat-map-ready dataset for 2025: rows for every (cost_center, month) combo, with `actual`, `budget`, and a status flag ('Over', 'Under', 'On Track' within ±5%, or 'No Data' if either is NULL). OpEx only, posted actuals. One row per CC per month that has at least actuals OR budget.
Each hint you reveal reduces the XP you can earn. Try the query first.
Build two subqueries — one for actuals (by cc, month) and one for budgets (by cc, month) — then FULL OUTER JOIN (or UNION of LEFT+RIGHT if you prefer).
CASE WHEN actual IS NULL OR budget IS NULL THEN 'No Data' WHEN actual > budget * 1.05 THEN 'Over' WHEN actual < budget * 0.95 THEN 'Under' ELSE 'On Track' END.
Expect 96 rows (8 CCs × 12 months; heads up Q4 2025 budgets are partially missing — 'No Data' rows are expected).