i need department wise top 2 employees salary.which logic
i will use

Answer Posted / ethayan

select foracid,clr_bal_amt from (select
foracid,clr_bal_amt,rank() over (order by clr_bal_amt desc
nulls last) as ranking
from tbaadm.gam order by a,clr_bal_amt nulls last)
where ranking=2

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are different types of triggers?

565


How many row comparison operators are used while working with a subquery?

539


What is the usage of when clause in trigger?

571


What are functions in sql?

511


What does select top 1 do in sql?

544






What is the basic form of sql query?

495


What is out parameter used for eventhough return statement can also be used in pl/sql?

588


What is the difference between rename and alias?

711


How many types of indexes are there in sql?

537


What does count (*) mean?

530


Which data type is a composite type?

534


Explain normalization and what are the advantages of it?

518


What is the difference between distinct and unique in sql?

476


What is a relationship and what are they?

582


What is pl sql code?

593