← BYTES
Database·Starter·Ref: 13.1.2

What does the SQL HAVING clause do that WHERE cannot?

Have a question about this video? Mention reference 13.1.2 when you contact us.

a.Filters rows before grouping
b.Filters groups after GROUP BY, based on an aggregate condition
c.Sorts the result set
d.Joins two tables
WHERE filters individual rows before aggregation; HAVING filters the resulting groups after GROUP BY, so it can reference aggregate functions like COUNT() or SUM() that don't exist until grouping happens.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES1312#Database