title: SQL Server: how to imitate oracle keep dense_rank query?
body: <p>I have an Oracle query</p>
  
  <pre><code>select max(m.id),
         m.someId keep (DENSE_RANK FIRST ORDER BY m.UpdateDate desc) 
  from MyTable m 
  groupBy m.someId
  </code></pre>
  
  <p>which for data like this:</p>
  
  <pre><code>id UpdateDate someId
  1  20-01-2012 10
  2  20-01-2012 10
  3  01-01-2012 10
  4  10-02-2012 20
  5  01-02-2012 20
  6  01-04-2012 30
  </code></pre>
  
  <p>will return me exactly this:</p>
  
  <pre><code>2 10
  4 20
  6 30
  </code></pre>
  
  <p>So, for every someId it searches for latest updateDate and does return the appropriate <code>id</code>. (And if there are a several ids for the latest dates it takes latest id).</p>
  
  <p>But for SQL server will this query work the same way? I mean this construction <code>keep (dense_rank first order by ..)</code>?</p>