Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can anyone please explain how this query works internally?

User_7FAONAug 3 2016 — edited Aug 3 2016

I have a table named 't1' and  column named salary and i want to find out 4th maximum salary? I know how to find it using analytic functions and so on..but i don't know how this level process works?

t1

salary

-------

10000

20000

40000

50000

30000

60000

45000

select level,max(salary) from t1 where level=4 connect by prior salary > salary group by level.......How this query works?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 31 2016
Added on Aug 3 2016
5 comments
216 views