Run a quarterly tier reshuffle in one query
Once a quarter billing reshuffles tiers: customers whose total paid revenue is 1000 or above move to «gold», 300–999 to «silver», below 300 stay on «free». Implement it as a single UPDATE on customers.tier. Customers with no paid orders keep their current tier — leave them alone.
Just INSERT/UPDATE/DELETE — no trailing SELECT needed.
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inFocus radio
Paused · SomaFM · Fluid