title: Show balance column data of previous row in total column in next row for same orderNo in mysql
body: <p>Here is my table:</p>
  
  <pre><code>+------+---------+------+------+
  | Name | orderNo  Total   used |
  +------+---------+------+------+
  | Row1 |    1    |   10 |    2 |
  | Row2 |    1    |    8 |    1 |
  | Row3 |    1    |    7 |    3 |
  | Row4 |    2    |   12 |    8 |
  +------+---------+-----+-------+
  </code></pre>
  
  <p>Here what I want:</p>
  
  <pre><code>+------+---------+------+------+---------+
  | Name | orderNo  Total   used   balance |
  +------+---------+------+------+---------+
  | Row1 |    1    |   10 |    2 |  8      |
  | Row2 |    1    |    8 |    1 |  7      |
  | Row3 |    1    |    7 |    3 |  4      |
  | Row4 |    2    |   12 |    8 |  4      |
  +------+---------+-----+-------+---------+
  </code></pre>
  
  <p>I have calculate the balance from difference of two columns value. but can't set the balance value in next row in total columns.
  Can anyone provide me a solution for this?</p>