afternoon all,
most likely a simple question but I have been unable to crack it.
have 1 table:
item - desc - custitem - retail - countofretail
what i need is the 5 above fields grouped by item and the max of countofretail
what i have so far:
this returns the correct number of records. if I add the retail field into the mix it returns all records in the table.
any suggestions?
thanks.
regards,
longhair
most likely a simple question but I have been unable to crack it.
have 1 table:
item - desc - custitem - retail - countofretail
what i need is the 5 above fields grouped by item and the max of countofretail
what i have so far:
Code:
SELECT [item], First([Desc) AS FirstOfDesc, First([custitem]) AS FirstOfCust, Max([countofretail]) AS [MaxOfCountOfRetail]
FROM [A]
GROUP BY [A].[item]
ORDER BY [A].[item];
any suggestions?
thanks.
regards,
longhair