I am asked for a consultation in which I must show the doctors assigned to an area and in the second parameter that is in another table how many doctors there are in that area, the truth is that I have a cacau of orders I generated this select
SELECT numArea, count(*)AS Quantitat metges
FROM hospital.metge
GROUP BY numArea
HAVING count(*)>1
WHERE numArea IS NOT NULL;
Of course it does not work, but at first sight there is some syntax error? I mean between FROM GROUP BY HAVING AND WHERE must there be a comma?