mahir_data
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
idINT
account_typeTEXT
balanceNUMERIC(10,2)

Example input

accounts