Question: what is the difference between having clause and where clause?
Answer: 2) WHERE clause is used for filtering rows and it applies on each and every row, while HAVING clause is used to filter groups in SQL. 3) One syntax level difference between WHERE and HAVING clause is that, former is used before GROUP BY clause, while later is used after GROUP BY clause.