On Monday 18 September 2006 14:55, Brent Baisley wrote: > You might try changing it to distinct if you are looking for unique count > of ids from each. SELECT a.a,aa,COUNT(DISTINCT b.id),COUNT(DISTINCT c.id) > FROM...
This return 0 or 1 for b.id (1 if there is 1 or more records) and the correct value for the c.id. -- Jørn Dahl-Stamnes homepage: http://www.dahl-stamnes.net/dahls/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]