title: Calculate balance from Credit and Debit records
body: <p>I have the following records in my database table:</p>
  
  <pre><code>Date            Credit  Debit      Description
  --------------- ------- -------    ---------------
  12-24-2015      5                  Purchased credit
  12-20-2015              1          Consumed credit
  12-15-2015      3                  Purchased credit
  12-08-2015              1          Consumed credit
  12-08-2015              1          Consumed credit
  12-07-2015              1          Consumed credit
  12-04-2015              1          Consumed credit
  12-03-2015              1          Consumed credit
  12-01-2015      5                  Purchased credit
  </code></pre>
  
  <p>I want to calculate and display the balance for each record as shown below:</p>
  
  <pre><code>Date         Credit  Debit   Balance  Description
  ------------ ------- ------- -------  ---------------
  12-24-2015   5       0       7        Purchased credit
  12-20-2015           1       2        Consumed credit
  12-15-2015   3       0       3        Purchased credit
  12-08-2015           1       0        Consumed credit
  12-08-2015           1       1        Consumed credit
  12-07-2015           1       2        Consumed credit
  12-04-2015           1       3        Consumed credit
  12-03-2015           1       4        Consumed credit
  12-01-2015   5       0       5        Purchased credit
  </code></pre>
  
  <p>Can anyone please help me to achieve the above result?</p>