SQL HAVING Clause

SQL HAVING Clause

The WHERE clause places conditions on the selected columns, whereas the HAVING clause places conditions on groups created by the GROUP BY clause.

The HAVING Clause enables you to specify conditions that filter which group results appear in the results.

SELECT ID, NAME, ADDRESS,AGE, SALARY
FROM CUSTOMER
GROUP BY age
HAVING COUNT(age) >= 3

2020-03-29