Just as a very simple example, let\'s say I have table test with sample data like so:
test
a | b ------------- 1 | 18 1 |
Whats wrong with a where clause:
select a, count(b) from test where b < 50 group by a