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!

Kindly explain how this query works?

LAVANKVDec 9 2014 — edited Dec 9 2014

select * from employees e1

where 1=(select count(distinct(salary)) from employees e2 where e1.salary <= e2.salary);

Can anybody explain how does this query works?

how the count(distinct(salary)) is getting the rank?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 6 2015
Added on Dec 9 2014
3 comments
919 views