title: mysql use group by column in where condition
body: <p>How can I make this query work :</p>
  
  <pre><code>SELECT column1.....,SUM(Hits) AS Hits   
  FROM table 
  WHERE  SUM(Hits) &gt; 100
  GROUP BY column1.....
  </code></pre>
  
  <p>The problem is the where clause, mysql display error :</p>
  
  <pre><code>Error Code : 1111
  Invalid use of group function
  </code></pre>
  
  <p>I try to change the query to :</p>
  
  <pre><code> SELECT column1.....,SUM(Hits) AS Hits   
      FROM table 
      WHERE  Hits &gt; 100
      GROUP BY column1.....
  </code></pre>
  
  <p>It did not help.</p>
  
  <p>thanks</p>