I want to show all cities that have have a count > 5
. I have tried to limit my results anything over a count of 5 but it isn't working.
SELECT
user.city,
Count(user.city) AS cnt
FROM user
Inner Join zip ON zip.zip = user.zip
WHERE cnt > 5
GROUP BY user.city
WHERE cnt > 5 **<--------------- It fails here**
cnt
has already been defined in the field list so why doesn't work?