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
Which column in the user.triggers data dictionary view shows that the trigger is a pl/sql trigger?
What is asqueryable?
What does trigger mean in psychology?
What are some predefined exceptions in pl/sql?
Are views faster than queries?
How to add a column ‘salary’ to a table employee_details?
What is restrict in sql?
What are commit, rollback, and savepoint?
can a stored procedure call itself or recursive stored procedure? : Sql dba
If the application is running very slow? At what points you need to go about the database in order to improve the performance?
What is nested table in pl sql?
What are sql ddl commands?
What is the most common sql injection tool?
Which is faster view or stored procedure?
How do you optimize a stored procedure query?