mahir_data
mediumHong Leong Bank · subqueryNew

Find accounts with zero transactions

Flag accounts as dormant if they have never appeared in the transactions table at all.

Return account_id and owner for every dormant account.

Schema

accounts
account_idINT
ownerTEXT
transactions
idINT
account_idINT
amountNUMERIC

Example input

accounts
transactions