I have tried to run a query where the reuslts are restricted by a
HAVING clause with 2 conditions, but the second condition seems to be
ignored.
for example
SELECT userid, AVG(position) FROM `table1` WHERE (status='finished')
GROUP BY userid HAVING (COUNT(*) >= 4 AND AVG(position) < 5.5)
returns exactly the same as
SELECT userid, AVG(position) FROM `table1` WHERE (status='finished')
GROUP BY userid HAVING (COUNT(*) >= 4)
even though there are values for AVG(position) returned that are > 6.
Is it the case that I can't have more than one condition in a HAVING
clause? have I got the syntax wrong? Is the behavior different in a
later version?
I am using "mysql Ver 11.15 Distrib 3.23.41, for redhat-linux-gnu
(i386)"
any help gratefully received.
- Graham Simms
gr****@muscat.com