Question · SQL and MySQL course · Module 6: Aggregation and grouping

WHERE versus HAVING - summary

Which statement best describes the difference between WHERE and HAVING?

Answer options

  • WHERE filters groups, and HAVING filters rows
  • Both filter groups after aggregation
  • WHERE filters rows before grouping, while HAVING filters groups after aggregation
  • WHERE sorts the result, and HAVING groups it

You can check the correct answer by solving this task in the CodeWorlds game.