Hello.
I have a following table.
mysql> SELECT * FROM group_test ;
+------+------+------+
| a | b | c |
+------+------+------+
| 1 | 1 | 1 |
| 1 | 1 | 1 |
| 1 | 1 | 1 |
| 2 | 2 | 2 |
| 2 | 2 | 2 |
| 3 | 3 | 3 |
+------+------+------+
6 rows in set (0.00 sec)
mysql> SELECt a, COUNT(*) FROM group_test
-> GROUP BY a, b ;
+------+----------+
| a | COUNT(*) |
+------+----------+
| 1 | 3 |
| 2 | 2 |
| 3 | 1 |
+------+----------+
3 rows in set (0.00 sec)
But, when I use HAVING and IN() togather, MySQL returns no rows.
mysql> SELECt a, COUNT(*) FROM group_test
-> GROUP BY a, b
-> HAVING COUNT(*) IN ( 1, 2, 3 ) ;
Empty set (0.00 sec)
Other relational operators works well.
I'm using MySQL 4.0.3
Thank you for advanced answer!.
Have a nice weekend.
##########################
Heo, Jungsu Mr.
SimpleX Internet. http://www.simplexi.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php