title: Compress Date Range
body: <p>I have a bunch of records in the format of</p>
  
  <pre><code>DATE         TYPE
  ----------   ------
  06/21/2014   TYPE A
  06/22/2014   TYPE A
  06/23/2014   TYPE A
  06/24/2014   TYPE B
  06/25/2014   TYPE C
  06/26/2014   TYPE C
  06/27/2014   TYPE A
  ...
  </code></pre>
  
  <p>I would like to print out a report that showed the range of type where these parameters existed in sequence.</p>
  
  <pre><code>        START       END         LENGTH
          ----------  ----------  ------
  TYPE A  06/21/2014  06/23/2014  3 
  TYPE B  06/24/2014  06/24/2014  1
  TYPE C  06/25/2014  06/26/2014  2
  TYPE A  06/27/2014  06/27/2014  1
  </code></pre>
  
  <p>Is there any way to display the data in this format from the schema I have been given?</p>