Chapter 6 · Subqueries
15. Accounts with Above-Average Balance
Medium20 XPFinance
The premium services team wants to identify accounts whose balance exceeds the overall average balance. Return the id, account_type, and balance of these accounts, sorted by balance descending.
Tables
- PKidINT
- FKcustomer_id→ customers.idINT
- account_typeTEXT
- balanceREAL
- currencyTEXT
- opened_atTEXT
- statusTEXT
Need help?
Ask Sol
AI tutor — looks at your current query and nudges you, without spoiling the answer.
Solution
Try the hints first — solving it yourself is what makes it stick.