title: Forming a Tsql query that ranks and categorizes date field
body: <p>I have this datset:</p>
  
  <pre><code>create table #date_example
  (
  date_val datetime, rownum int
  )
  
  insert #date_example values('3/1/14',1)
  insert #date_example values('3/1/14',2)
  insert #date_example values('3/1/14',3)
  insert #date_example values('2/1/14',4)
  insert #date_example values('1/3/14',5)
  
  select --top 1 with ties
  date_val, 
  ROW_NUMBER() OVER(PARTITION BY rownum ORDER BY date_val DESC) AS 'RowNum'
  
  from #date_example
  order by date_val
  desc
  </code></pre>
  
  <p>With output:</p>
  
  <pre><code>date_val    RowNum
  2014-03-01 00:00:00.000 1
  2014-03-01 00:00:00.000 1
  2014-03-01 00:00:00.000 1
  2014-02-01 00:00:00.000 1
  2014-01-03 00:00:00.000 1
  </code></pre>
  
  <p>But I want instead output:</p>
  
  <pre><code>date_val    RowNum
  2014-03-01 00:00:00.000 1
  2014-03-01 00:00:00.000 1
  2014-03-01 00:00:00.000 1
  2014-02-01 00:00:00.000 2
  2014-01-03 00:00:00.000 3
  </code></pre>
  
  <p>So I want the RowNum to be a ranking which includes ties.  How can I do this?</p>