where_vs_having.txt (406B)
Q: What is the difference between WHERE and HAVING? A: The main difference is that WHERE filters individual rows before any grouping or aggregation occurs, while HAVING filters groups after the GROUP BY clause has been applied and aggregated. An important practicality of this difference is that HAVING only makes sense with SELECT queries, whereas WHERE can be used for UDATE and DELETE queries as well.