Simple SQL programing question


Senior member
Jul 17, 2001
I've got a table that has ProductID, customer, and price. There are multiple productIds (ie. 4 instances of productID = 5) each with different prices. I'm trying to write a query that will return a productID and the maximum price for that productID.

(When I do select distinct productID, price it returns multiple productIDs. I'm not sure how to use the MAX function to apply it for each productID).

How would I go about doing this?

Thanks in advance.