Query for second maximum salary in each in each department
Answer Posted / jairam
select deptno,Max(e1.sal) from emp e1
where e1.sal NOT IN(select Max(e2.sal) from emp e2
group by e2.deptno)group by e1.deptno
Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is the difference between execution of triggers and stored procedures?
How does a covering index work?
What is record data type?
Are sql connections encrypted?
what are all the different types of indexes? : Sql dba
What does fetching a cursor do?
Explain the purpose of %type and %rowtype data types?
Can sql function call stored procedure?
what are the different type of normalization? : Sql dba
What is bind reference and how can it be created?
What is the difference between local and global temporary table?
Is sql a case sensitive language?
What action do you have to perform before retrieving data from the next result set of a stored procedure ?
where are cookies actually stored on the hard disk? : Sql dba
What normalization means?