Chapter 4 · Aggregations
16. Total Balance by Account Type
Easy10 XPFinance
The finance team wants to see total deposits broken down by account type. Calculate the sum of balance for each account_type. Return the account_type and total_balance, sorted by total_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.