title: SQL Server changes is levels of partitioned groups
body: <p>I have a table that is a list of inventories for different items on different days. The dates are irregular. I want to get a table of changes from the last known value for each SKU group. What is the best way to find this when the dates are irregular?</p>
  
  <pre><code> SKU | Quantity | Date     
   --- | -------- | ----     
  123  |  20      | 1/1/17    
  123  |  20      | 1/2/17    
  123  |  45      | 1/6/17    
  123  |  36      | 1/10/17    
  555  |  23      | 1/2/17    
  555  |  54      | 1/5/17    
  555  |  56      | 1/9/17    
  555  |  13      | 1/11/17
  </code></pre>