Query for second maximum salary in each in each department
Answer Posted / ram
SELECT empno,salary,dept_id FROM (SELECT empno,salary,dept_id,DENSE_RANK() OVER (PARTITION BY Dept_id ORDER BY Salary DESC)
as Rnk FROM emp) WHERE Rnk = 2;
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
List and explain the different types of join clauses supported in ansi-standard sql?
Explain what is a view?
How many sql commands are there?
What is sql key?
How can we avoid duplicating records in a query?
what are all different types of collation sensitivity? : Sql dba
Can you selectively load only those records that you need? : aql loader
What is an invalid partition table?
What does := mean in pl sql?
Is pl sql a programming language?
what are the different type of normalization? : Sql dba
Which sorts rows in sql?
ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..
Does sqlite need a server?
what is the difference between inner and outer join? Explain with example. : Sql dba