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
What is a primary key sql?
what are the advantages of using stored procedures? : Sql dba
How to look at the current sql*plus system settings?
Does sql support programming?
What is form and report?
What is pivot table in sql?
what are the differences between char and varchar? : Sql dba
What is trigger and stored procedure in sql?
what are the non-standard sql commands supported by 'mysql'? : Sql dba
how would you get the current date in mysql? : Sql dba
What is the function that is used to transfer a pl/sql table log to a database table?
How to Execute a Package in PL/SQL.?
What is pl sql and why it is used for?
what is query cache in mysql? : Sql dba
What is pl sql collection?