title: Same Row_Number for Same Values
body: <p>I need to have row numbering where the ROW_NUMBER is the same for same value column:  MFGPN (Same MFGPN will always be in sequence).  I also need to maintain the original sequence by No.</p>
  
  <p>Here's my table</p>
  
  <pre><code>No     MFGPN
  1      Z363700Z01
  2      Z363700Z01
  3      0119-960-1
  4      1A3F1-0503-01
  </code></pre>
  
  <p>I tried using RANK() to achieve the desired but am running into trouble.</p>
  
  <pre><code>SELECT RANK() OVER(ORDER BY MFGPN) As [Item], MFGPN FROM Table1 ORDER BY [No] ASC
  </code></pre>
  
  <p>RESULT</p>
  
  <pre><code>Item   MFGPN           Desired Result
  3      Z363700Z01            1
  3      Z363700Z01            1
  1      0119-960-1            2
  2      1A3F1-0503-01         3
  </code></pre>
  
  <p>Appreciate you guys' expert advise.  Thanks!</p>