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
How many clustered indexes can you have?
What is a temporal data type?
How do I upgrade sql?
Why do we create views in sql?
What is benefit of creating memory optimized table?
How many joins can you have in sql?
Which is faster subquery or join?
What is database white box testing and black box testing?
What is a primary key sql?
what is a relationship and what are they? : Sql dba
Can we use the cursor's to create the collection in PL/SQL?
What is the difference between sum and count in sql?
what is transaction? : Sql dba
Can a view be mutating? If yes, then how?
What is insert command in sql?