Query for second maximum salary in each in each department

Answer Posted / arvind kumar

select * from employees e where (select count(salary) from
employees where salary >=e.salary)=2;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the trigger in sql?

542


Why select is used in sql?

522


What are the advantages of normalization?

560


Where not exists in sql?

506


Explain the difference between drop and truncate commands in sql?

540






What if we write return in procedure?

789


Inline the values in PL/SQL, what does it mean.?

635


What is a stored procedure in sql with example?

606


What is cte?

578


What is blind sql injection?

578


What are inner and outer joins examples of both?

501


Can you join a table to itself?

544


What is an inner join sql?

549


Explain some predefined exceptions.

591


how to use in conditions? : Sql dba

514