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

What is difference between Mapplet and reusable transformation?

9 Answers   Wipro,


What is a stored procedure transformation?

0 Answers  


What is incremental aggregation?

0 Answers  


I have name like INDIA in a column. I want display 1st line A, 2nd line N, 3rd line D, 4th line I, 5th line A in oracle data base?

1 Answers   Cognizant, HCL,


source table have 3 records? and it is sucessfully loaded into target. and 4more records is added in to source .that means 7 records now in source. we have to load the remaining 4 records into the same trgt table with maintian top 3 records. how ?can any one give me the data flow of this logic plz?

5 Answers   Wipro,


how to get the only updated records in the target

2 Answers  


What is the need for an etl tool?

0 Answers  


Hi, I am new to Informatica, What is a flat file and how to use flat file in infomratica please help me.

10 Answers   CSC,


connected and unconnected lookups?

4 Answers  


What is domain in terms of informatica?

0 Answers  


What is the difference between Normal load and Bulk load?

5 Answers  


What is confirmed fact in dataware housing?

2 Answers   Hewitt, TCS,


Categories