This sql code throws an
aggregate functions are not allowed in WHERE
SELECT o.ID , count(p.CAT)
FROM Orders o
INNER JOIN Products p ON o.P_ID = p.P_ID
WHERE count(p.CAT) > 3
GROUP BY o.ID;
How can I avoid this error?
See Question&Answers more detail:os