SQL Server HAVING clause on SELECT statements
The SQL HAVING clause is used in conjunction with the GROUP BY clause to filter the results of a query based on the group by clause. The HAVING clause is used to filter the results of a GROUP BY clause, whereas the WHERE clause is used to filter the results of a query before the GROUP BY clause is applied. …