Need help with aggregate function...for each unique product, I need the
provider with the cheapest cost factor
Here't the table (Table1)
ID product provider factor
1 123456 abc .050
2 123456 def .035
3 666666 def .040
4 123456 ghi .080
5 666666 abc .026
6 666666 ghi .054
"Logical" query is
SELECT [Table1].[product], Min([Table1].[factor]) AS cheapest,
[Table1].[provider]
FROM Table1
GROUP BY [Table1].[product];
Problem is adding the provider - error
"You tried to execute a query that does not include the specified
expression 'provider' as part of an aggregate function"
Results wanted:
product cheapest provider
123456 .035 def
666666 .026 abc
Thanks in Advance,
Jim