Operations & Supply Chain Analytics · Mission 6 of 30Easy

Total units ordered per category last quarter

GROUP BY + date filter + SUM, with category-normalization trap.

The Brief

Raj PatelProcurement Managerslack-dm

For our Q1 procurement review I need total units ordered per category for last quarter (Jan-Mar 2026). Pull from `fact_purchase_orders` joined to `dim_skus`, group by `category`, sum `qty_ordered`. Use the order date, not the arrival date — I care about when we placed the orders. Heads up: the category column has some casing inconsistency (a few SKUs got loaded as `electronics` lowercase). Normalize them — I want one row per real category.

You'll practice

GROUP BYDate filterCasing normalization

Tables & columns available

fact_purchase_ordersfact12 columns
ColumnTypeKey
po_idINTPK
po_numberTEXT
sku_idINTFK → dim_skus
supplier_idINTFK → dim_suppliers
warehouse_idINTFK → dim_warehouses
order_dateTEXT
expected_arrivalTEXT
actual_arrivalTEXT
qty_orderedINT
qty_receivedINT
unit_costREAL
statusTEXT
dim_skusdim6 columns
ColumnTypeKey
sku_idINTPK
sku_codeTEXT
sku_nameTEXT
categoryTEXT
unit_costREAL
reorder_pointINT

Hints (3)

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

Hint 1

JOIN `fact_purchase_orders` to `dim_skus` ON `sku_id`. Filter `order_date BETWEEN '2026-01-01' AND '2026-03-31'`.

Hint 2

Wrap `category` in `LOWER()` so 'Electronics' and 'electronics' collapse to one bucket.

Hint 3

GROUP BY the normalized category, SUM(qty_ordered), ORDER BY category. Five rows total.