Write a query to find second highest salary of an employee.
Answer Posted / oboyah
SELECT e1.* from ( SELECT last_name, salary,
DENSE_RANK() OVER ( ORDER BY salary DESC) rank
FROM employees) e1 where e1.Rank = 2;
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
what is foreign key? : Sql dba
How do I filter in sql profiler?
what is 'mysqlimport'? : Sql dba
Why stored procedures are faster than query?
What is insert command in sql?
what are set operators in sql? : Sql dba
Mention what does plv msg allows you to do?
what is a primary key? : Sql dba
Why indexing is needed?
Why do we use subquery?
What is mdf ldf and ndf?
What is sqlca in db2?
how do you login to mysql using unix shell? : Sql dba
How do I start sql profiler?
Why is there a need for sqlcode and sqlerrm variables?