I have an interesting problem that I cannot find any clues to in the MySQL documentation. The following query works in 3.2.3, but does not work in 4.1.7:
SELECT `Product`.`Product`, `AssignedToAgent`.`AgentName` AS `AssignedTo`, sum(`Inquiries`) AS `Inquiries` FROM `Inquiry` INNER JOIN `Product` ON `Inquiry`.`ProductKey` = `Product`.`ProductKey` INNER JOIN `Agent` AS `AssignedToAgent` ON `Inquiry`.`AssignedToKey` = `AssignedToAgent`.`AgentKey` INNER JOIN `DateDim` AS `DateOpen` ON `Inquiry`.`DateOpenKey` = `DateOpen`.`DateDimKey` WHERE `DateOpen`.`Year` = '2003' GROUP BY `Product`.`Product`, `AssignedToAgent`.`AssignedTo`; It appears that if I take the table alias "AssignedToAgent" out of the GROUP BY clause (leaving just the column alias "AssignedTo"), the query will then work in 4.1.7 - even though the table alias does not present a problem in 3.2.3. Any ideas why? Any help would be greatly appreciated. Geoff Thompson Avaion Support [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> http://www.avaion.com <http://www.avaion.com/>