For every transaction, return account_id, txn_date, txn_id and balance — the running balance (credits add, debits subtract), in date order per account (ties by txn_id).
18 rows with columns account_id, txn_date, txn_id, balance — first 3 shown:
| # | ||||
|---|---|---|---|---|
| 1 | 102 | 2025-01-03 | 7 | 30000 |
| 2 | 102 | 2025-01-20 | 8 | 25000 |
| 3 | 102 | 2025-02-03 | 9 | 55000 |
Run your code to see the output here.