Complex~34min
The Loyalty Tier That Never Downgrades
6 customers assigned gold status had spend collapse in every single quarter of 2024 — Q1 to Q4, each quarter strictly lower than the last — landing their annual total at ₹140,000, well under gold's ₹150,000 floor. No override on file, the tier-assignment cron never re-ran. 10 more gold customers show the identical quarterly collapse to the identical total, but they have a documented retention-team override.
Tables you'll query
customersquarterly_spendloyalty_tiers
What you'll learn
CTEs (WITH clause)Window FunctionsAggregations & GROUP BY