How to Find Inactive Customers in Postgres — Without Writing SQL
Somewhere in your Postgres database is a list of customers who used to pay attention to you and quietly stopped. Finding them means comparing last-activity timestamps against today across users, orders, and events tables — with timestamptz math that punishes anyone who mixes up UTC and local time. If you're a founder or ops lead without a data team, these five plain-English questions surface the dormant accounts and what they're worth.
“Which customers have not made a purchase or logged in for the last 90 days?”
This is your win-back list, and it's usually worth more than your ad budget — these people already chose you once. In a typical SaaS or commerce schema the answer joins customers to their most recent order or session, ranked by silence, which is a five-second ask and a fiddly query.
You get: A table of customers ranked by days inactive, with last activity date and lifetime value.
“How much revenue came from customers who are now inactive?”
Putting a dollar figure on dormancy is what turns “we should do a win-back campaign” into a funded project. If lapsed customers historically generated a third of revenue, recovering even a tenth of them beats most acquisition channels on cost.
You get: A total of historical revenue from now-inactive customers, split by how long they’ve been dormant.
“Is our number of inactive customers growing or shrinking month over month?”
A snapshot tells you the size of the problem; the trend tells you whether it's getting worse. Rising dormancy alongside steady signups means you're filling a leaky bucket — a retention problem masquerading as healthy growth in your topline numbers.
You get: A monthly series of inactive-customer counts with the direction and rate of change.
“What do our inactive customers have in common — plan, signup source, or company size?”
If dormant accounts cluster in one segment — say, small teams from one campaign on the starter plan — you've found either a targeting problem or a product gap for that segment. Shared traits turn a win-back list into a prevention strategy.
You get: A breakdown of inactive customers by plan, source, and segment versus the active base.
“Which high-value customers are showing early signs of going quiet?”
You'd rather catch a big account at 30 days of declining activity than at 90 days of silence. Weighting recency by account value produces a short, prioritized outreach list — the five calls that protect the most revenue this week.
You get: A prioritized list of high-value accounts with declining activity, ranked by revenue at risk.
Stop reading. Ask.
Connect Postgres or start with sample data — first answers in under 2 minutes.
Ask this on your data — freeFree plan available · No credit card required
Frequently asked questions
Do I need SQL to pull these lists?
No — each question above is asked in plain English and the AI writes and runs the Postgres query for you, read-only. You can export any resulting list as a CSV for your email tool or CRM.
Is it safe to connect my production Postgres database?
Yes. Connections are read-only by default, so customer records cannot be changed or deleted. A dedicated SELECT-only role or a read replica gives you a second layer of protection if you want it.
Activity for us means several things — logins, orders, API calls. Can "inactive" combine them?
Yes. Define it in the question — "no login, order, or API call in 90 days" — and the AI takes the most recent timestamp across all three tables per customer before applying the cutoff. You can tighten or loosen the definition in a follow-up.
Related question packs
How to Find Inactive Customers in Supabase — Without Writing SQL
Find inactive users in your Supabase project with plain English. Use auth.users last sign-in data to build win-back lists — no SQL editor needed.
How to Find Inactive Customers in MySQL — Without Writing SQL
Find inactive or lapsed customers in your MySQL database using plain English. Win-back lists and revenue at risk — no SQL, no DATEDIFF wrangling.
How to Measure SaaS Churn in Postgres — Without Writing SQL
Measure SaaS churn straight from your Postgres database in plain English. Monthly rates, at-risk accounts, and revenue lost — no SQL, no data team.