How do I do a WHERE on the COUNT(name) produced by a GROUP BY clause?
- by ssg31415926
WHERE gets processed before GROUP BY in the SELECT statement. How can I use WHERE on the result of a COUNT(name)?
What I want is this:
SELECT topic, COUNT(name) AS counter
FROM blah
GROUP BY name
WHERE counter <> 1