title: ROW_NUMBER() shows unexpected values
body: <p>My table has values like (<code>RowCount</code> is generated by the query below):</p>
  
  <pre><code>ID       Date_trans   Time_trans  Price  RowCount
  -------  -----------  ----------  -----  --------
  1699093  22-Feb-2011  09:30:00    58.07  1
  1699094  22-Feb-2011  09:30:00    58.08  1
  1699095  22-Feb-2011  09:30:00    58.08  2
  1699096  22-Feb-2011  09:30:00    58.08  3
  1699097  22-Feb-2011  09:30:00    58.13  1
  1699098  22-Feb-2011  09:30:00    58.13  2
  1699099  22-Feb-2011  09:30:00    58.12  1
  1699100  22-Feb-2011  09:30:08    58.13  3
  1699101  22-Feb-2011  09:30:09    57.96  1
  1699102  22-Feb-2011  09:30:09    57.95  1
  1699103  22-Feb-2011  09:30:09    57.93  1
  1699104  22-Feb-2011  09:30:09    57.96  2
  1699105  22-Feb-2011  09:30:09    57.93  2
  1699106  22-Feb-2011  09:30:09    57.93  3
  1699107  22-Feb-2011  09:30:37    58     1
  1699108  22-Feb-2011  09:30:37    58.08  4
  1699109  22-Feb-2011  09:30:38    58.08  5
  1699110  22-Feb-2011  09:30:41    58.02  1
  1699111  22-Feb-2011  09:30:41    58.02  2
  1699112  22-Feb-2011  09:30:41    58.01  1
  1699113  22-Feb-2011  09:30:41    58.01  2
  1699114  22-Feb-2011  09:30:41    58.01  3
  1699115  22-Feb-2011  09:30:42    58.02  3
  1699116  22-Feb-2011  09:30:42    58.02  4
  1699117  22-Feb-2011  09:30:45    58.04  1
  1699118  22-Feb-2011  09:30:54    58     2
  1699119  22-Feb-2011  09:30:57    58.05  1
  </code></pre>
  
  <p>The <code>ID</code> column is an IDENTITY column.<br>
  And I'm using this query to get the <em>consecutive row count</em> as:</p>
  
  <pre><code>  SELECT   ID, Date_trans, Time_trans, Price
            ,ROW_NUMBER() OVER(PARTITION BY Price  ORDER BY ID) RowCount
    FROM     MyTable
    ORDER    BY ID;
  </code></pre>
  
  <p>The <code>RowCount</code> I get is right for most of the values but wrong for some values. For instance:</p>
  
  <ul>
  <li>ID 1699100 Price 58.13 – count should be 1 (showing 3).  </li>
  <li>ID 1699104 Price 57.96 – count should be 1 (showing 2).  </li>
  <li>ID 1699105, 1699106 Price 57.93 – count should be 1, 2 (showing 2, 3).</li>
  </ul>
  
  <p>I have tried the same query in PostgreSQL and found the same results.<br>
  I have uploaded <a href="https://docs.google.com/open?id=0B3QJE7P_Z7bWTHMtMi14NUl2UGc" rel="nofollow">a csv data sample here</a>.</p>
  
  <p>I'm stuck with such unexpected results of partition. Can anybody help me?</p>