title: How do I group on continuous ranges
body: <p>I know some basic SQL, but this one is beyond me. I have looked high and low but no dice. I need a view of the following data, I can do this in the application layer code. But unfortunately for this particular one, the code must be put in the data layer.</p>
  <p>I am using T-SQL.</p>
  <p>Table</p>
  <pre><code>Date      Crew       DayType
  01-02-11  John Doe  SEA  
  02-02-11  John Doe  SEA  
  03-02-11  John Doe  SEA  
  04-02-11  John Doe  HOME  
  05-02-11  John Doe  HOME  
  06-02-11  John Doe  SEA 
  </code></pre>
  <p>I need a view like this</p>
  <pre><code>DateFrom  DateTo    Name      DayType
  01-02-11  03-02-11  John Doe  SEA
  04-02-11  05-02-11  John Doe  HOME
  06-02-11  06-02-11  John Doe  SEA
  </code></pre>
  <p>Unfortunately, the base table is required for the application layer to be in the format shown. Is this possible to do in a query?</p>