how to find the 5th highest salary form each department
using 1.SQL Query
2. Informatica power center designer?

Answers were Sorted based on User's Feedback



how to find the 5th highest salary form each department using 1.SQL Query ..

Answer / kondeti srinivas

sql query:
SELECT * FROM (SELECT DEPTNO,SAL,RANK()OVER (PARTITION BY DEPTNO ORDER BY SAL DESC) AS RNK) WHERE RNK=5

IN INFORMATICA

SOURCE ---SQ--RANK TANSFORMATION IN THAT SELECT DEPTNO AS GROUP BY PORT AND SAL AS RANK PORT AND SELECT TOP AND RANK =5

OUT PUT FROM RANK WILL BE DEPARTMENT WISE TOP 5 SALARIES ARE DISPLOYED AND FROM RANK TRANFORMATION CONNECT ALL PORTS INCLUDE RANKINDEX TO FILTER GIVE A CONDITION LIKE RANKINDEX=6

AND CONNECT ALL PORTS TO TARGET

Is This Answer Correct ?    14 Yes 6 No

how to find the 5th highest salary form each department using 1.SQL Query ..

Answer / yaseen

Select deptno,distinctsal from emp A where 5= (select count(distinctsal) from emp B where A.sal <= B.sal) groupby deptno

SQ----Rank TR-----Target
Rank t/R ---Group by on Deptno, Top --5

Plz correct if I am wrong

Is This Answer Correct ?    2 Yes 0 No

how to find the 5th highest salary form each department using 1.SQL Query ..

Answer / kumar

Can be implemented using RANK Analytic function


http://netezzamigration.blogspot.com/2014/10/analytic-functions-in-netezza.html

Is This Answer Correct ?    0 Yes 0 No

how to find the 5th highest salary form each department using 1.SQL Query ..

Answer / saleem

SQL query:
select rownum,empno,ename,job,sal from (select
rownum,empno,ename,job,sal from emp rder by sal desc)
group by rownum,empno,ename,job,sal having rownum =&n;
(with this query we will get which highest salary u want)

Is This Answer Correct ?    3 Yes 9 No

Post New Answer

More Informatica Interview Questions

&#61656; Suppose you have n no.of records @ your flat file and you have seen some of records are missing while reaching to the destination. How can you trouble shoot it?

2 Answers   DELL,


need for registering a repository server

1 Answers  


What are slowly changing dimensions?

5 Answers   Informatica, Verinon Technology Solutions,


my source is like this id,name sal 10 abc 1000,10 pqr 2000, 10 xyz 3000 ,10 jkl 4000 and my requirement is like this 10 abc,pqr,xyz,jkl 2000 .... i have try for this by using expression transformatin its ok of the concatenation of second column but the thing is that on third column if u group by using agg t/r the last value will com i.e 4000 but i asked by a interviewer that i dont want the first or last column i want the middle column i.e 2000 .plz reply for the same

2 Answers   KPIT,


if i have 10 records in my source,if we use router t/r and given the condition as i>2,i=5 and i<2in the different groups what is the o/p in the target

5 Answers   TCS,






What is power center repository?

1 Answers  


I have a source file its is CSV(comma separated). I want to convert it to tab separated. Make sure the conversion happens on all commas except the ones enclosed in Double quotes .

2 Answers   CTS,


Why update strategy and union transformations are active?

0 Answers  


i have a table like empid ename year month sal 1 x 98 jan 500 1 x 98 feb 500 1 x 98 mar 500 1 x 99 jan 600 1 x 99 feb 600 2 y 98 jan 600 2 y 98 feb 600 2 y 98 mar 600 2 y 99 jan 700 2 y 99 jan 700 and so on i want to find out totsal for every emp on year wise plz help me

4 Answers   Magna Infotech,


what are the limitation of sorter transformation?

2 Answers   TCS,


how we load the data from source to staging area

4 Answers   TCS,


why we r using presql&postsql in source qualifier?

1 Answers   HP,


Categories