grain

What exactly one row of a result, table or report represents, such as one order, one order line or one customer per month.

In more detail

Decide the grain before writing a query. A join to detail rows changes it, for example from one row per order to one row per item, which inflates counts unless you count distinct keys or aggregate before joining.

Related terms

Taught in

References