title: MySQL Query Ranking
body: <p>I have this MySQL query for list a "Vote Ranking" for "Actions" and it work fine, but I want what the "id_user" doesn't repeat, like made a "DISTINCT" in this field.</p>
  
  <pre><code>SELECT
  count(v.id) votos, 
  v.id_action,
  a.id_user,
  a.id_user_to,
  a.action,
  a.descripcion
  FROM
      votes v,
      actions a
  WHERE
      v.id_action = a.id
  GROUP BY
      v.id_action
  ORDER BY
      votos DESC
  </code></pre>
  
  <p>The result:</p>
  
  <pre><code>votes  act     id_user
  3      3       745059251
  2      20      1245069513
  2      23      1245069513
  2      26      100000882722297
  2      29      1245069513
  2      44      1040560484
  2      49      1257441644
  2      50      1040560484
  </code></pre>
  
  <p>The expected result</p>
  
  <pre><code>votes  act  id_user
  3      3    745059251
  2      20   1245069513
  2      26   100000882722297
  2      44   1040560484
  2      49   1257441644
  2      50   1040560484
  </code></pre>