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
Can we join two tables without common column?
Why stored procedure is faster than query?
Does pl sql work in mysql?
How can we store rows in PL/SQL using array?
What does an inner join do?
explain the difference between delete , truncate and drop commands? : Sql dba
What is cross join example?
what is the difference difference between procedure and packages
What is a common use of group by in sql?
What is pl sql package?
Can I learn sql in a week?
What does inner join mean?
What does trigger mean in slang?
Is primary key always clustered index?
What is the difference between local variables and global variables?