Skip to content
Advertisement

oracle sql max value

i have a requirement, i need to find max only one val from each department,i need only one value even 2 person have same max value

when i tried to find max i will get 2 value for maths dept

2 tamil krish
4 maths raja
4 maths vinay

i want either

2 tamil krish
4 maths vinay

or

2 tamil krish
4 maths raja

how to achieve this ion oracle sql

Advertisement

Answer

You can use the ROW_NUMBER as follows:

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement