i need department wise top 2 employees salary.which logic
i will use
Answer Posted / naresh anumolu
SELECT * FROM(SELECT *,DENSE_RANK() OVER(PARTITION BY DEPTNO ORDER BY SAL DESC) AS RANK FROM EMP)A WHERE RANK<3
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
When to use inner join and left join?
What is sequence in sql?
What is the use of sqlerrd 3?
Difference between global and parameter variables?
Can instead of triggers be used to fire once for each statement on a view?
Is left join faster than join?
what are the advantages a stored procedure? : Sql dba
What are the types of triggers in sql?
What are the different ways to optimize a sql query?
What is the purpose of a secondary key?
What is data abstraction in sql?
What is trigger and how to use it in sql?
what is 'mysqlimport'? : Sql dba
What is primary key sql?
How does a covering index work?