i need department wise top 2 employees salary.which logic
i will use
Answer Posted / shyam
select * from
(select ename,job,sal,deptno,
dense_rank()
over(partition by deptno order by sal desc) densrank
from emp)
where densrank<=2;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the most important ddl statements in sql?
how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba
What is the sql case statement?
What is before trigger?
What are the types of functions in sql?
what is datawarehouse? : Sql dba
what is the use of double ampersand (&&) in sql queries?
What are some emotional triggers?
what is the functionality of the function htmlentities? : Sql dba
What is sql procedures and functions?
What are the different types of dbms?
what happens if you no create privilege in a database? : Sql dba
Is nosql relational?
What is pl sql block in dbms?
What are the different schemas objects that can be created using pl/sql?