Flag customers who barely buy
CRM wants to flag «dormant» customers — those whose total paid revenue (status = 'paid') is below 100. Support will follow up with them.
For such customers set tier to 'dormant'. Important nuance: customers with no paid orders at all also count as dormant — interpret their revenue as zero, otherwise the < 100 comparison would silently skip them.
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