i need department wise top 2 employees salary.which logic
i will use
Answer Posted / shreya
select level,deptno,max(sal)
from emp
where level in (1,2)
connect byy prior sal>sal
group by level,deptno
order by deptno
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How do you use a while loop in pl sql?
Is it important to partition hard disk?
What is an index? What are the types of indexes? How many clustered indexes can be created on a table?
Why procedure is used in sql?
How can you maintain the integrity of your database on instances where deleting an element in a table result in the deletion of the element(s) within another table?
Which is better cte or subquery?
Is the primary key an index?
Is sqlite thread safe?
What is the difference between the repeatable read and serializable isolation levels? : Transact sql
Does execute immediate commit?
Why plvtab is considered as the easiest way to access the pl/sql table?
what does it mean to have quoted_identifier on? : Sql dba
how many columns can be used for creating index? : Sql dba
Explain two easy sql optimizations.
What are the different operators available in sql?