select top 3 sal from each dept?

Answer Posted / nag.vamshi

select* from(select ename,deptno,sal,row_number()
over(partiton by deptno order by sal)num from emp)
where num<=3
order by deptno;





Is This Answer Correct ?    24 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there any restriction on the use of union in embedded sql?

679


How do I sort a table in sql?

599


what are all the common sql function? : Sql dba

587


What is record in pl sql?

593


What is inner join in sql?

586






What does the acronym acid stand for in database management?

546


What is the least restrictive isolation level? : Transact sql

565


Can we use commit inside a trigger?

529


Is pl sql still used?

511


what is the difference between primary key and unique key? : Sql dba

531


What are procedures used for?

529


What are the types of operators available in sql?

554


Is primary key is clustered index?

529


How do you clear the screen in sql?

603


How would you convert date into julian date format?

594