easyGXBank · aggregation
Average balance by account type
GXBank wants to compare how much customers hold across account types.
From the accounts table, return each account_type and the average balance for that type as avg_balance.
Schema
▸accounts
| id | INT |
| account_type | TEXT |
| balance | NUMERIC(10,2) |
Example input
▸accounts