This is called the running total.
If you have a datetime column, you can use something like this:
SELECT t1.id, t1.transactiondatetime, amount, ( SELECT SUM(amount) FROM dbo.table1 as t1 WHERE t1.transactiondatetime <= t0.transactiondatetime ) AS balance FROM dbo.table1 AS t0
source share