Both WHERE and HAVING clauses can contain search conditions to further filter the rows selected. The major difference between both of them is that HAVING can be used with aggregate functions like AVG, SUM, MIN, MAX, etc. whereas WHERE does not support them. Also, the HAVING clause requires the GROUP BY clause to be present (due to aggregation) to work. WHERE condition is used to filter individual records based on one or more conditions.