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 db journal file?
What is the use of %rowtype?
What is a dirty read sql?
how to add a new column to an existing table in mysql? : Sql dba
what is single byte over head in oracle..?
Which are the different types of indexes in sql?
How do you remove duplicates without using distinct in sql?
How is a process of pl/sql compiled?
Explain spool.
What is the difference between distinct and unique in sql?
what are the different tables present in mysql? : Sql dba
Why is pl sql used?
How do you determine the current isolation level? : Transact sql
What does over partition by mean in sql?
Which join condition can be specified using on clause?