Query for second maximum salary in each in each department
Answer Posted / akula
select * from emp e1 where 2 =(select count(distinct(sal)) from emp e2 where e1.dno=e2.dno and e1.sal<=e2.sal);
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How do I write a sql query in pgadmin 4?
What are character functions in sql?
How many postgresql users are there, worldwide?
How do I find duplicates in sql?
What is data definition language?
How to get each name only once from an employee table?
What is difference between rank () row_number () and dense_rank () in sql?
explain the delete statements in sql
Is it important to partition hard disk?
how many tables will create when we create table, what are they? : Sql dba
What is the difference between database trigger and stored procedure?
What does fetching a cursor do?
What are sql objects?
What is sql prepared statement?
when MSQL8.0 is in market