title: SQL Having Clause with multiple selected fields
body: <p>I have a SQL query such as the following:</p>
  
  <pre><code>SELECT field1, field2, field3, field4, field5
  FROM tablename
  WHERE field1 = condition
  GROUP BY 1,2,3,4,5
  HAVING COUNT(field1) &gt; 2
  </code></pre>
  
  <p>I expected the query to return only the results which have more than 2 rows in the resultset, however the query returns 0 zero.</p>
  
  <p>Could anyone point out what I'm doing wrong?  I need to keep my query selecting the fields it has been, but limit the results coming back to only those who have at least 2 rows.  If they only have 1, I don't want them included in my results.</p>