ledger_entries (entry_id, account_id, posted_at, amount) is a bank ledger. Batches are posted together, so several entries on one account can share the same posted_at; within a batch they are applied in entry_id order.
Return every entry with balance: the account's balance right after that entry — the sum of the account's amounts up to and including it, in (posted_at, entry_id) order. Each entry has its own balance, even when it shares a timestamp with others.
Columns: account_id, entry_id, posted_at, amount, balance. Sort by account_id, posted_at, entry_id.