I have a table:
PRICE_UPDATE id (int 5, auto-increment, primary, unique) part_number (varchar 10, non-null) price (float(10,2), non-null)
Some of part_number duplicated (1 or more duplicate entries). Sometimes with the same price, sometimes with different prices.
How to remove all duplicate rows based on part_number, leaving either the highest price or only 1 entry if the prices were the same?
Is it even doable in direct MySQL?
user1083975
source share