title: Running Balance in sql
body: <p>I have tried the following query to get account transactions</p>
  
  <pre><code>select TranRef, TrnDate, AcNumber, AcName, DrCr, amount from Accounts
  join Voucher
  on Accounts.acid = voucher.accountno
  join Transactions
  on Transactions.TrnRef = Voucher.TranRef
  where acnumber = 1010
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/pYsSA.jpg" alt="Result of my query"></p>
  
  <p>but I want the result in following format</p>
  
  <p><img src="https://i.stack.imgur.com/igiNa.jpg" alt="the Result which I want"></p>