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

Can a trigger call a stored procedure?

750


How many functions are there in sql?

724


What is sql architecture?

750


Define sql delete statement.

746


Is sql similar to python?

719






How can one get sql*loader to commit only at the end of the load file? : aql loader

750


What is the usage of sql functions?

818


What are sql commands?

696


What is the difference between left outer join and left join?

709


How do temporal tables work?

694


Can we want to pass a parameter payroll_id to this external pl/sql function, how do we do it?

786


what are the disadvantages of mysql? : Sql dba

763


How many types of sql are there?

722


How to convert comma separated string to array in pl/sql?

812


What are the events on which a database trigger can be based?

821