For account 101, return each txn_id, txn_date, amount and running_credit — total of credit amounts up to and including that transaction's date. Do it with a self-join, no window functions.
6 rows with columns txn_id, txn_date, amount, running_credit — first 3 shown:
| # | ||||
|---|---|---|---|---|
| 1 | 6 | 2025-03-01 | 50000 | 150000 |
| 2 | 5 | 2025-02-14 | 25000 | 100000 |
| 3 | 4 | 2025-02-01 | 50000 | 100000 |
Run your code to see the output here.