I have a query that selects CustomerID, ProductID, and a WeightFactor for each product...
Customer Product WeightFactor
1 5 2.3
1 7 5.0
1 10 1.2
2 5 2.3
2 10 1.2
3 1 0.2
I want to return a set of results that tells me the highest weighted product number that each customer purchased...
Customer Product
1 7
2 5
3 1
I have a Customers table, a Product table (that includes ProductID and WeightFactor), and a Purchases table that includes CustomerID and ProductID (to tell me which customers purchased what products).
I'm sure this can be done through SQL, but I can't seem to find the magic syntax to accomplish this. Any help?
Customer Product WeightFactor
1 5 2.3
1 7 5.0
1 10 1.2
2 5 2.3
2 10 1.2
3 1 0.2
I want to return a set of results that tells me the highest weighted product number that each customer purchased...
Customer Product
1 7
2 5
3 1
I have a Customers table, a Product table (that includes ProductID and WeightFactor), and a Purchases table that includes CustomerID and ProductID (to tell me which customers purchased what products).
I'm sure this can be done through SQL, but I can't seem to find the magic syntax to accomplish this. Any help?