title: How to add a Row_Index to a Mysql Select statement that is unique only by the data in one column?
body: <p>Below is the basis of my select statement</p>
  
  <pre><code>SELECT id, name, data FROM users
  </code></pre>
  
  <p>Example:</p>
  
  <pre><code> id    name   data 
    1     a     4
    2     a     2
    3     a     8
    4     a     5
    5     b     4     
    6     b     3
    7     b     2    
    8     c     5
    9     c     7
    10    c     2
  </code></pre>
  
  <p>I want to add a column to the select statement that will count how many times a specific data entry in column "name" appears.  I do not want to find just the total of how many times A,B or C appears in the table. I want to have some kind of incremental ID (Index),that essentially will count out how many times A,B or C are entered into the table.</p>
  
  <pre><code> id    name   data  Index
    1     a     4       1 
    2     a     2       2
    3     a     8       3
    4     a     5       4
    5     b     4       1
    6     b     3       2
    7     b     2       3
    8     c     5       1
    9     c     7       2
    10    c     2       3
  </code></pre>
  
  <p>This is my first post so please let me know if this is not clear.</p>