Get the Max value of a field in an "aggregate"
420246Aug 23 2004 — edited Aug 23 2004Hello,
I perform the following:
Select prod, color, reference from users where prod='PEN'
I get:
PEN BLUE 1234
PEN BLUE 7885
PEN RED 1111
PEN RED 2222
PEN BLUE 9999
But I want to get:
PEN BLUE 9999
PEN RED 2222
I mean I need only one line by (PROD,COLOR) with the max for the reference.
How should I proceed ?
Any help is greatly appreciated.
Regards,
Jerome