Databases · Junior · Question 28 of 75

What is the difference between WHERE and HAVING?

Explanation

Example: GROUP BY city HAVING COUNT(*) > 100. You can't use an aggregate in WHERE because aggregates don't exist yet at that stage.

Further reading

Problem with a question

Databases · Junior · question 28

Test yourself

Take the Databases · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz