3 Comments
User's avatar
Maxime Beauchemin's avatar

> even though here you will need to sum them up

Careful! Once you materialize `COUNT(DISTINCT customer_id)`, it becomes non-additive!

JP Monteiro's avatar

Oh, damn. You're totally right. Thanks! Should have come up with a better example.

JP Monteiro's avatar

Added an educational footnote for the rescue.