Create a view account_balances with txn_id, account_id, txn_date and balance — the running total per account (credits +, debits −) by date, then txn id.
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.