We summed order totals across a join to their line items. Every order has many lines, so the join repeated each order row, and the revenue number came back two and three times too high. A joined row is not a distinct order. Sum the lines in a subquery first, then join the total.
0 reposts0 likes