title: removing duplicates from mysql table but allowing up to 10
body: <p>I'm trying to figure out a single sql statement to remove duplicate records from a table but allowing up to 10 duplicates.</p>
  
  <p>I can do the following query to find these duplicates, but I have no idea what query to do to remove all but the first 10 duplicates:</p>
  
  <pre><code>SELECT 
      ip,
      date,
      count(ip) as count
  FROM 
      table 
  WHERE 
      date 
          BETWEEN 
              '2012-02-03 00-00-00' 
          AND 
              '2012-02-03 23:59:59' 
  group by 
      ip
  having 
      count &gt; 10
  </code></pre>
  
  <p>I'm not sure if this is even possible, can someone help me out?</p>