Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Question
Hai try this
select x.cola , x.colb
from x , (select cola, max(colc) colc from x group by cola) b
where x.colc = b.colc
and x.cola = b.cola
Regards
Suresh Kumar
Lui Yuan Tze wrote:
> Hi,
> suppose I have the following table:
> table X with
> col A col B col C
> xx y 99
> xx t 100
> yy a 10
> yy d 30
> yy e 5
>
> How do I code SQL to get the values of col A and col B of the
> max col C value for each col A ? ie record no 2 and no 4.
>
> Thanks ahead
Received on Mon Apr 27 1998 - 08:45:02 CDT
![]() |
![]() |