#30

Final balance by account

Use the transaction log to calculate the final balance for each account. transaction_type can be Deposit or Withdrawal. Return account_id and final_balance. Sort the result by account_id.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

account_idfinal_balance
1001300.00
2003400.00
3002250.00
PayPal

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid