title: MySQL: LIMIT by a percentage of the amount of records?
body: <p>Let's say I have a list of values, like this:</p>
  
  <pre><code>id  value
  ----------
  A   53
  B   23
  C   12
  D   72
  E   21
  F   16
  ..
  </code></pre>
  
  <p>I need the top 10 <strong><em>percent</em></strong> of this list - I tried:</p>
  
  <pre><code>  SELECT id, value 
      FROM list
  ORDER BY value DESC
     LIMIT COUNT(*) / 10
  </code></pre>
  
  <p>But this doesn't work. The problem is that I don't know the amount of records before I do the query.  Any idea's?</p>