SyntaxFix
Write A Post
Hire A Developer
Questions
You can't use an aggregate directly in a WHERE clause; that's what HAVING clauses are for.
You can use a sub-query which contains an aggregate in the WHERE clause.