Skip to main content
All Problems
easy0% acceptance

Total Fees Charged Per Account

The billing team wants to see total fees charged to each account. Return account_id and total_fees for accounts that have at least one fee transaction. Only consider transactions where type is 'fee'. Order by total_fees descending.

Schema

🔑idINT
🔗account_idINT
transaction_dateTEXT
typeTEXT
amountREAL
balance_afterREAL
descriptionTEXT
reference_numberTEXT
postgresql

Run your query to see results

Press Ctrl + Enter to execute