I have an error on a sql request and I don’t know where it comes from. The request :
SELECT Max(Salary * Months), Count(*) From Employee ORDER BY Salary HAVING Count(Salary) > 1;
I get the following error :
ERROR 1064 (42000) at line 4: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'HAVING Count(Salary) > 1' at line 1
I know there is something wrong with how I use Having, but I don’t know what is wrong. If I remove the Having part, I don’t have an error.
Also, sorry for the long title, I could not write a proper title because it was forbidden ( no reason where given)