Skip to main content
All Problems
medium0% acceptance

Accounts with Balance Above Overall Average

The wealth management team wants to identify accounts whose balance exceeds the bank-wide average balance. Use a scalar subquery in the WHERE clause. Return account id, customer_id, account_type, and balance. Sort by balance descending. Limit to 30.

Schema

🔑idINT
🔗customer_idINT
account_typeTEXT
balanceREAL
currencyTEXT
opened_atTEXT
statusTEXT
postgresql

Run your query to see results

Press Ctrl + Enter to execute