I have a table "Article" [product in ENG] which contains as attributes (numArticle [PK], poids [weight in English], des_ [Designation], couleur [color]) and I want to select the designation of the products with highest weight from each color.
I tried this
SELECT des_
FROM Article
WHERE poids = ANY (SELECT MAX(poids) 'poidse'
FROM Article
GROUP BY couleur);
but didn't work and I didn't know why at first but figured it out later.
Simply put I want to assign to each weight of a product in subquery it's designation.
The subquery returns the highest weight of each color but doesn't give the designation since I can't use select designation without including it in GROUP BY
Clause because if I did that its gives unwanted result.