sql group by having count code example
Example 1: sql count having
SELECT COUNT( * )
FROM agents
HAVING COUNT(*)>1; --count is greater than 1
Example 2: mysql HAVING
SELECT colonne1, SUM(colonne2)
FROM nom_table
GROUP BY colonne1
HAVING fonction(colonne2) operateur valeur