title: Oracle : break down multiple entries monthwise
body: <p>i have data in table as below</p>
  
  <pre><code>start_date      end_date        amount
  15-01-2012      25-01-2012      100
  26-01-2012      10-02-2012      100
  11-02-2012      29-02-2012      100
  </code></pre>
  
  <p>i want these entries to be break down monthwise as below</p>
  
  <ul>
  <li>15-01 to 25-01 = 100</li>
  <li>26-01 to 31-01 = 100/((10-02-2012 - 26-01-2012) +1 ) * ((31-01-2012 - 26-01-2012) + 1) = 37.5
  so for period of 15-01-2012 to 31-01-2012 = 100 + 37.5 = 137.5</li>
  </ul>
  
  <p>for month of february amount should be</p>
  
  <ul>
  <li>01-02 to 10-02 = 100/((10-02-2012 - 26-01-2012) +1 ) * ((01-02-2012 - 10-02-2012) + 1) = 62.5</li>
  <li>11-02 to 29-02 = 100</li>
  </ul>
  
  <p>so for the february 01-02-2012 to 29-02-2012 = 62.5 + 100 = 162.5</p>
  
  <p>so that final output should be</p>
  
  <pre><code>start_date      end_date        amount
  15-01-2012   31-01-2012                  137.5
  01-02-2012   29-02-2012          162.5
  </code></pre>
  
  <p>is there any method to achieve this without using PLSQL</p>