Final balance by account
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. Your answer must use the same column names as this sample — alias them with AS if needed.
| account_id | final_balance |
|---|---|
| 100 | 1300.00 |
| 200 | 3400.00 |
| 300 | 2250.00 |
PayPal
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inFocus radio
Paused · SomaFM · Fluid