title: How to get cumulative max records from the table without using OLAP function?
body: <p>I have a table like below</p>
  
  <pre><code>   -------------------------------------
     | Id | startdate | enddate    |rate|
     -------------------------------------
     | 1  | 1/1/2015  | 2/1/2015   | 10 |
     | 1  | 2/1/2015  | 3/1/2015   | 15 | 
     | 1  | 3/1/2015  | 4/1/2015   | 5  |
     | 1  | 4/1/2015  | 5/1/2015   | 10 |
     | 1  | 5/1/2015  | 6/1/2015   | 20 |
     | 1  | 6/1/2015  | 7/1/2015   | 30 |
     | 1  | 7/1/2015  | 8/1/2015   | 10 |
     | 1  | 8/1/2015  | 9/1/2015   | 30 |
     | 1  | 9/1/2015  | 12/31/2015 | 20 |
     ------------------------------------
  </code></pre>
  
  <p>I need to populate cumulative max values for each id (Id=1 for this example) including the first record, like below (SQL server 2008):</p>
  
  <pre><code>   ----------------------------------
     | Id | startdate | enddate  |rate |
     ----------------------------------
     | 1  | 1/1/2015  | 2/1/2015 | 10  |
     | 1  | 2/1/2015  | 3/1/2015 | 15  |
     | 1  | 5/1/2015  | 6/1/2015 | 20  |
     | 1  | 6/1/2015  | 7/1/2015 | 30  |
     | 1  | 8/1/2015  | 9/1/2015 | 30  |
     -----------------------------------
  </code></pre>
  
  <p>Can any one help me on this? </p>