Dormant Accounts
Medium
Fraud & Risk Queries
Treat 2026-10-06 as today. Return the ids of accounts with no transaction in the last 90 days (since 2026-07-08), including accounts that never had a transaction. Order by id.
Table schema
Accounts(id INT PRIMARY KEY)
Transactions(id INT PRIMARY KEY, account_id INT, tx_date DATE)Sample data
Accounts: 1, 2, 3
Transactions:
id | account_id | tx_date
1 | 1 | 2026-09-01
2 | 2 | 2026-05-01
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.