title: Instance of repeating data in a table
body: <p>Lets say I have a table that looks like this:</p>
  
  <pre><code>table = (Key int, ID int)
  </code></pre>
  
  <p>I need to be able to number incrementally each repeating instance of the ID column.
  For example, if we have a sample of data that looks like this:</p>
  
  <pre><code>ID
  --
  99
  100
  101
  102
  103
  100
  101
  102
  103
  </code></pre>
  
  <p>I need a query that can return the following results:</p>
  
  <pre><code>99    1
  100   1
  101   1 
  102   1
  103   1
  100   2
  101   2
  102   2
  103   2
  </code></pre>
  
  <p>I cannot seem to get this working. Can anyone help out?</p>