how to retrieve the top 3 salaries of the table using rownum

Answer Posted / kalyan kumar

select e.ename,e.sal from emp e where 3>(select count
(distinct(b.sal)) from emp b where b.sal>e.sal)

Is This Answer Correct ?    19 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of functions in sql?

569


how to create a new table by selecting rows from another table in mysql? : Sql dba

563


Define implicit and explicit cursors.

630


What is your daily office routine?

1812


Is primary key a clustered index?

537






Which are the different types of indexes in sql?

563


what is the different between now() and current_date()? : Sql dba

526


What is sequence in sql?

506


How does rowid help in running a query faster?

970


what are sequences

1097


What is the difference between jpql and sql?

555


What is the usage of distinct keyword?

632


How to select the Nth maximum salary from Table Emp in Oracle SQL Plus ?

603


What are the different types of dbms?

554


What are the two parts of design view?

583