Explain why aggregate rates must be built from eligible row evidence before grouping.
Sam needs a chargeback rate by payment method, but the first setup lets incompatible payment states enter the denominator. Before: every payment attempt flows into the rate. After: captured payments define the denominator before grouping. The row filter moved before the rollup: captured payment status and date window are applied in WHERE so failed attempts do not dilute the denominator. The GROUP BY stays at payment method, so each output row answers one method-level question rather than mixing method with transaction state. The aggregate counts chargeback facts inside the eligible payment set, which keeps numerator and denominator aligned. Clean the…
Sign up free: one personalized lesson every day, matched to your role and goals.
Already have an account? Sign in