Syntax of HAVING Clause in SQL-
SELECT <column_name(s)>
FROM <table_name>
WHERE<condition>
GROUP BY<column_name(s)>
HAVING <condition>;
Example of HAVING Clause in SQL-
SELECT COUNT (CustomerID), Country
FROM Customers
GROUP BY Country
HAVING COUNT (CustomerID)>3;
–This SQL statement will lists the number of customers in each country havng more than 3 customers.