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
What is the difference between local and global temporary table?
What are the different sql languages?
what is the difference between undefined value and null value? : Sql dba
How do I clear the screen in sql plus?
Is sql a case sensitive language?
Where are my tempfiles, I don't see them in v$datafile or dba_data_file?
What is embedded sql what are its advantages?
How can we implement rollback or commit statement in a trigger?
What is pl sql commands?
What is the maximum number of triggers, you can apply on a single table?
How can we store rows in PL/SQL using array?
Is grant a ddl statement?
what are the security recommendations while using mysql? : Sql dba
what is rollback? : Sql dba
What is meant by truncate in sql?