adspace


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 is bcp? When does it used? : Sql dba

1055


If a cursor is open, how can we find in a pl/sql block?

1236


What is the current version of sql?

1092


How do I remove duplicates in two columns?

1185


what is sql server agent? : Sql dba

1182


what is collation? : Sql dba

1229


how to escape special characters in sql statements? : Sql dba

1113


how many tables will create when we create table, what are they? : Sql dba

1144


What is the current version of postgresql?

1177


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

2090


Is primary key clustered index?

1018


Is primary key always clustered index?

1094


What is the best sql course?

1050


What is your daily office routine?

2345


how to start mysql server? : Sql dba

1266