PostgreSQL Having Clause
In PostgreSQL, HAVING clause is used in combination with GROUP BY clause to pick out particular rows where the function's result meets some condition.
See this example:
Let's take a table "EMPLOYEES" having the following data.
See this example, which would display record for which name count is less than 2.
Execute the following query:
Let's insert some duplicate records in the "EMPLOYEES" table. Add the following data:
Execute the following query to retrieve the name from table "EMPLOYEES" where name count is greater than 1.