Without a filter, every query returns every row, which is rarely what anyone wants. WHERE keeps only the rows that match a condition, like employees whose salary is above 50000. Use it to filter individual rows before any grouping happens. To filter groups after GROUP BY, such as departments with more than 5 people, you need HAVING instead.