Complex~35min

The Shrinking Box

Natura Oats has held 41% gross margin for six straight quarters despite raw material costs rising 28%. The CFO sent a congratulations email to the ops team. The ops team knows something the CFO doesn't.

Tables you'll query

productsprice_historycost_recordsorder_items

What you'll learn

CTEs (WITH clause)Window FunctionsDate & Time FunctionsAggregations & GROUP BY
Investigate this case →