Hugo Kornelis (6/6/2010)
And you are right, that would have been a better distractor. I'm not sure why I included the "one row, value 2" option. It's a while back I made this question; if I recall correctly, the HAVING clause first tested for >= 5, and I changed this later but apparently forgot to change the distractor.
Hugo, I think the "one row, value 2" answer was for people so used to group by that they instinctively grouped by col1. Then the HAVING would limit it to col1=2, and the WHERE would have eliminated #4, so you'd get a count of 2. I know I ALMOST made that mistake.