Skip to main content
All Problems
hard0% acceptance

Highest Balance Account per Type

For each active account, show the highest balance within that account type using FIRST_VALUE. Return account_type, id, balance, and type_max_balance. Sort by account_type, balance DESC.

Schema

🔑idINT
🔗customer_idINT
account_typeTEXT
balanceREAL
currencyTEXT
opened_atTEXT
statusTEXT
postgresql

Run your query to see results

Press Ctrl + Enter to execute