How to find only %th Highest Sal

Answer Posted / sujit pingale

Ans: select distinct(a.salary) from customers a where &n =
(select count(distinct(b.salary)) from customers b where
a.salary <= b.salary);

It will ask you to enter number in input box which salary
you want to see

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to read xml file in oracle pl sql?

697


What is a pragma statement?

963


The select into statement is most often used to create backup copies of tables or for archiving records?

779


How many types of functions are there in sql?

677


Is it possible to include an insert statement on the same table to which the trigger is assigned?

744


What is the difference between clustered and non-clustered indexes?

816


What is time based sql injection?

701


Can we write dml inside a function in sql server?

680


define sql update statement ? : Sql dba

815


what is the difference between group by and order by in sql? : Sql dba

780


How to select all records from the table?

821


Does sql*plus have a pl/sql engine?

760


What does trigger mean in psychology?

716


What is the difference between local variables and global variables?

812


What does the sign mean in sql?

710