Grain and fan-out checks
A query can run correctly and still give the wrong number. Row multiplication is one of the most common reasons.
State the input grain
orders contains one row per order. order_items contains one row per line item. Order-level sales is repeated if you join an order to its several items.
Predict fan-out
Before a join, check whether the matching key is unique on the other side. COUNT(*) before and after the join reveals row growth, but row growth can be legitimate if the new grain is intentional.
Protect measures
Aggregate line amounts at order grain before joining to orders, or sum quantity * unit_price at item grain. SUM(DISTINCT sales) is not a general fix: different orders may have equal sales.
Validate with reconciliations
Compare order counts, distinct keys and revenue with a trusted base query. A row-count increase and a revenue increase deserve separate explanations.