Getting counts > x

I want to get a list of names that occur more than 10 times in a table. Sounds simple but I can’t get the syntax. I tried

(SELECT name, COUNT(*) AS cnt FROM t1 GROUP BY name) AS c
ON c.cnt > 10

and a few other variations but all get rejected as syntax problems.

Thanks

SELECT name
     , COUNT(*) AS cnt 
  FROM t1 
GROUP 
    BY name
[B][COLOR="Blue"]HAVING cnt > 10[/COLOR][/B]

Aha, the one I didn’t try. :slight_smile: Thank you so much.