title: SQL: retrieve only the records whose value has changed
body: <p>Sorry for the nondescript title. I'll edit as we go along.</p>
  
  <p>I have a table <code>RateTable</code>:</p>
  
  <pre><code>| Code   |  Date     |   Rate  |
  
    B001     2009-01-01   1.05
    B001     2009-01-02   1.05
    B001     2009-01-03   1.05
    B001     2009-01-04   1.05
    B001     2009-01-05   1.06
    B001     2009-01-06   1.06
    B001     2009-01-07   1.06
    B001     2009-01-08   1.07
  </code></pre>
  
  <p>There is an entry for each day, but the Rate rarely changes. Can I write a SQL query that will only return the rows in which a Rate change occurs? I'm using SQLServer</p>