Advantage Error Guide
Problem: The HAVING clause was used without a GROUP BY clause.
Solution: You must use a GROUP BY clause in order to use the HAVING clause.