Query for second maximum salary in each in each department

Answer Posted / arvind kumar

select * from employees e where (select count(salary) from
employees where salary >=e.salary)=2;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between sql and mysql.

565


Explain the uses of a database trigger?

566


How do you remove duplicates without using distinct in sql?

499


What is indexing in sql and its types?

543


Where is pl sql used?

516






What are variables in pl sql?

561


What is the requirement of self-join?

544


What is dynamic sql in pl sql?

491


What is count * in sql?

551


How to call shell script from pl sql procedure?

625


Why do we use set serveroutput on?

515


What are all different types of collation sensitivity?

523


What does bitemporal mean?

595


What is sql dialect?

529


How to run sql functions in pl/sql?

536