title: Separating Overlapping Date Ranges in Oracle
body: <p>I have data with overlapping data ranges. Example below</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Customer_ID</th>
  <th>FAC_NUM</th>
  <th>Start_Date</th>
  <th>End_Date</th>
  <th>New_Monies</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>12345</td>
  <td>ABC1234</td>
  <td>26/NOV/2014</td>
  <td>26/MAY/2015</td>
  <td>100000</td>
  </tr>
  <tr>
  <td>12345</td>
  <td>ABC1234</td>
  <td>12/DEC/2014</td>
  <td>12/JUN/2015</td>
  <td>200000</td>
  </tr>
  <tr>
  <td>12345</td>
  <td>ABC1234</td>
  <td>15/JUN/2015</td>
  <td>15/DEC/2015</td>
  <td>500000</td>
  </tr>
  <tr>
  <td>12345</td>
  <td>ABC1234</td>
  <td>20/DEC/2015</td>
  <td>20/JUN/2016</td>
  <td>600000</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to convert this table into data with non overlapping ranges such that for each overlapping period, the New_Monies column is summed together and shown as a new row. For the example above, I want the output to be as follows</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Customer_ID</th>
  <th>FAC_NUM</th>
  <th>Start_Date</th>
  <th>End_Date</th>
  <th>New_Monies</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>12345</td>
  <td>ABC1234</td>
  <td>26/NOV/2014</td>
  <td>11/DEC/2014</td>
  <td>100000</td>
  </tr>
  <tr>
  <td>12345</td>
  <td>ABC1234</td>
  <td>12/DEC/2014</td>
  <td>26/MAY/2015</td>
  <td>300000</td>
  </tr>
  <tr>
  <td>12345</td>
  <td>ABC1234</td>
  <td>27/MAY/2015</td>
  <td>12/JUN/2015</td>
  <td>200000</td>
  </tr>
  <tr>
  <td>12345</td>
  <td>ABC1234</td>
  <td>15/JUN/2015</td>
  <td>15/DEC/2015</td>
  <td>500000</td>
  </tr>
  <tr>
  <td>12345</td>
  <td>ABC1234</td>
  <td>20/DEC/2015</td>
  <td>20/JUN/2016</td>
  <td>600000</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Row 2 above being the overlapping period of 12 Dec 2014 to 26 May 2015 showing the total New_Monies as 300000 (100000+200000)</p>
  <p>What would be the best way to do this in Oracle?</p>
  <p>Thanks in advance for your support.</p>
  <p>Regards,
  Ani</p>