title: MySQL query to return only duplicate entries with counts
body: <p>I have a legacy MySQL table called <code>lnk_lists_addresses</code> with columns <code>list_id</code> and <code>address_id</code>. I'd like to write a query that reports all the cases where the same <code>list_id</code>-<code>address_id</code> combination appears more than once in the table with a count.</p>
  
  <p>I tried this...</p>
  
  <pre><code>SELECT count(*), list_id, address_id
  FROM lnk_lists_addresses
  GROUP BY list_id, address_id
  ORDER BY count(*) DESC
  LIMIT 20
  </code></pre>
  
  <p>It works, sort of, because there are fewer than 20 duplicates. But how would I return only the counts greater than 1?</p>
  
  <p>I tried adding "<code>WHERE count(*) &gt; 1</code>" before and after <code>GROUP BY</code> but got errors saying the statement was invalid.</p>