Management wants to compare average account balances across account statuses (active, closed, frozen). Return the status, the count of accounts, and the average balance rounded to two decimal places. Sort by average balance descending.
Schema
🔑idINT
🔗customer_idINT
account_typeTEXT
balanceREAL
currencyTEXT
opened_atTEXT
statusTEXT
postgresql
Run your query to see results
Press Ctrl + Enter to execute