Complex~37min
The Aging Bucket That Skips a Step
5 invoices jump directly from the current aging bucket to 90+ between two snapshots that are a normal 7 days apart — skipping the 30 and 60 buckets entirely, with no missing-week excuse. That pattern means the invoice's true age was concealed. 12 more invoices also appear to skip a bucket, but that's because week 8's snapshot run never happened for anyone — a 14-day gap, not 7.
Tables you'll query
invoicesaging_snapshots
What you'll learn
CTEs (WITH clause)Window FunctionsDate & Time Functions