From the given table ,
COLA COLB COLC COLD
---- ---- ---- ----
1 4 a 1
2 6 s 2
4 9 d 3
3 17 e 1
5 11 f 2
6 15 r 3
I would like to retreive,
COLA COLB COLC
---- ---- ----
3 17 e
ie., values for COLA,COLB and COLC having max value for COLB .
I know we can use,
select COLA,COLB,COLC from table
where COLB in (select max(COLB) from table )
but,is there any other way to write this query for better execution ?
COLA COLB COLC COLD
---- ---- ---- ----
1 4 a 1
2 6 s 2
4 9 d 3
3 17 e 1
5 11 f 2
6 15 r 3
I would like to retreive,
COLA COLB COLC
---- ---- ----
3 17 e
ie., values for COLA,COLB and COLC having max value for COLB .
I know we can use,
select COLA,COLB,COLC from table
where COLB in (select max(COLB) from table )
but,is there any other way to write this query for better execution ?