2nd greatest values
Hi ,
I'm having three columns with numbers. I have to find first largest,2nd largest and third largest value
Currently i'm using following logic
ley say col 1 =10 col2=4; col3 = 7
1 greatest = greatest (col1,col2,col3) which is 10
3 greated = least (col1,col2,col3) which is 4
2nd greatst = (10+4+7) - (1st greatest - 3rd greatest) which is 7.
Is there any oracle function like greatest,least to find second largest.
Thanks,
Sujeeth