β Fullstack with Vue.jsQuestion 18 of 62
How does the HAVING clause work in SQL?
π Explanation
HAVING is applied after rows have been grouped and aggregated, letting you filter based on aggregate results, whereas WHERE filters rows before any grouping happens. It doesn't replace WHERE in joins, doesn't run before grouping like WHERE does, and it's not used for sorting results, that's the job of ORDER BY.
Related questions
β PreviousNo login needed