Returning the first row of a group [message #4216] |
Tue, 19 November 2002 14:26 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
I have a table TAB with columns C1, C2, C3, and C4.
The select I am using is:
SELECT C1, C2, C3, Max(C4) from TAB GROUP BY C1, C2, C3.
I basically want 1 row for each set of distinct C1, C2, Max(C4) values. If there are multiple C3 values, I just want to select 1 of the rows (I don't care which one).
Can anyone tell me how to do this (We're not using Enterprise Oracle, so analytic functions aren't enabled).
|
|
|
|