Query for second maximum salary in each in each department
Answer Posted / swaraj
Select Department,Max(Salary)
From (Select E1.Department,E1.Salary
From Employee E1,(Select Department,Max(Salary) as Salary
From Employee group by Department) E2
Where E1.Department = E2.Department
And E1.Salary<E2.Salary) E
Group by Department
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
State some properties of relational databases?
What are the advantages of sql?
what is online transaction processing (oltp)? : Sql dba
What is scope of pl sql developer in future?
What is a native sql query?
Can you rollback after commit?
Can we use pl sql in mysql?
what is innodb? : Sql dba
Is sql a scripting language?
What does where 1 1 mean in sql?
Can you upgrade sql express to full sql?
Which query operators in sql is used for pattern matching?
How can you fetch common records from two tables?
Which join is default?
what are all the common sql function? : Sql dba