title: How to build a rank in mysql?
body: <p>I have a problem with the database.</p>
  
  <p>I have a table of the following structure:</p>
  
  <pre><code>name    type   data  frequen
  name1   type1   d1      10
  name2   type1   d2      15
  name2   type1   d3      25
  name2   type2   d4      02
  name3   type2   d5      05
  name3   type3   d6      20
  </code></pre>
  
  <p>I need to create a rank of the most frequent features of each name and each type by sorting the frequency in descending order.</p>
  
  <p>Example:</p>
  
  <pre><code>name    type   data  frequen  rank
  
  name1   type1   d1      10     1
  name2   type1   d2      15     2
  name2   type1   d3      25     3
  name2   type2   d4      02     1
  name3   type2   d5      05     2
  name3   type3   d6      20     1
  </code></pre>
  
  <p>Would anyone know how to do something like this? I am using mysql with phpmyadmin.</p>