title: SQL - Consolidate Overlapping Data
body: <p>I have a simple data set in SQL Server that appears like this</p>
  
  <pre><code>**ROW    Start    End**
    0     1        2
    1     3        5
    2     4        6
    3     8        9
  </code></pre>
  
  <p>Graphically, the data would appear like this
  <img src="https://i.stack.imgur.com/c2sQK.png" alt="enter image description here"></p>
  
  <p>What I would like to achieve is to collapse the overlapping data so that my query returns</p>
  
  <pre><code>**ROW    Start    End**
    0     1        2
    1     3        6
    2     8        9
  </code></pre>
  
  <p>Is this possible in SQL Server without having to write a complex procedure or statement?</p>