Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / mark berlin
-- Solution #3
select distinct salary from (
select salary,
RANK() OVER (order by salary desc NUlls last) as RRANK
FROM employees
)
Where RRANK = 2;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How can I speed up sql query?
What is the best free sql database?
can a stored procedure call itself or recursive stored procedure? : Sql dba
What are all the different types of indexes?
how do you tune the slow running queries in oracle db , explain the methodology
Is sql free?
What is rename command in sql?
What is data type in sql?
Is sql a backend?
Can we use the cursor's to create the collection in PL/SQL?
How does postgresql compare to mysql?
What is dialect in sql?
when MSQL8.0 is in market
what are the maximum number of rows that can be constructed by inserting rows directly in value list? : Transact sql
How do I view a sql database?