Create ledger with txn_id, account_id, txn_date, signed_amount (credits +, debits −) and balance (running total per account 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.