title: Add first row decimal value to next rows in SQL Server
body: <p>I have table, as below and its contains customer electricity volume for the period as. Available data like    </p>
  
  <pre><code>OwnerID StartDate   EndDate     Volume
  ---------------------------------------
   1      2019-01-01  2019-01-15  10.40
   1      2019-01-16  2019-01-31   5.80
   1      2019-02-01  2019-02-10   7.90
   1      2019-02-11  2019-02-28   8.50 
  </code></pre>
  
  <p>For this <code>OwnerID = 1</code>, having existing some volume 0.90. This should apply first row (add)</p>
  
  <ol>
  <li>Get the whole number and decimal part value</li>
  <li>the first row returned decimal value should add to next row and vice vera.</li>
  </ol>
  
  <p>ExistingVolume  - 0.90 </p>
  
  <p>So expected result set should like:</p>
  
  <pre><code>OwnerId StartDate   EndDate     CalulatedVolume  AppliedExistingVolume(0.90)   RemainExistingVolume 
  ----------------------------------------------------------------------------------------------------
      1   2019-01-01  2019-01-15         11                0.60                   0.30
      1   2019-01-16  2019-01-31          6                0.20                   0.10
      1   2019-02-01  2019-02-10          8                0.10                   0.00
      1   2019-02-11  2019-02-28          8                0.00                   0.50 
  </code></pre>
  
  <p>Could you someone suggest how to achieve this is in SQL query?</p>