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
What is sql basics?
What is difference between mysql and postgresql?
How to run sql statements through the web interface?
Define select, insert, create, delete, update, drop keywords
How many types of privileges are available in sql?
What is microsoft t sql?
Where is sql database stored?
Is pl sql a programming language?
What are the parameter modes supported by pl/sql?
What does the base_object_type column shows in the user.triggers data dictionary view?
What does the argument [or replace] do?
What is the sql query to display the current date?
Why we use stored procedure instead of query?
What are different types of indexes?
Does truncate free space?