Machine-translated by Google. Questions are authored in English.
Top

Discussion

In SQL, the WHERE clause filters rows before grouping while HAVING filters after grouping.

  • A.True
  • B.False

Answer: B

Correct answer: True

WHERE is applied to individual rows before GROUP BY forms the groups, so it cannot refer to an aggregate. HAVING is applied to the groups afterwards, which is why a condition such as COUNT(*) greater than 5 must go there.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.