Comparisons

Pairs that get conflated in real conversations. Neither column wins — what decides is the requirement, and each record leads with the confusion, because the confusion is the reason the record exists at all.

Order grain vs Order-line grain

What people get wrong about this pair

This is the single most common source of confidently wrong numbers in analytics. Joining the two without care multiplies every order-level measure by the number of lines, and nothing raises an error.

One row per order
Use it when

Order-level measures: order count, average order value, revenue per order.

One row per order line
Use it when

Product-level questions: units by product, basket composition, per-line discounting.

DimensionOne row per orderOne row per order line
Row countNumber of ordersNumber of lines — always larger
Summing `order_total`CorrectMultiplied by lines per order
Which products were bought togetherUnanswerable — the detail is goneDirectly answerable
Average order valueCorrectSilently becomes average line value
The fixKeep both, at declared grains, and never join them without aggregating one firstSame