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 a code page?

0 Answers  


Performance tuning in UNIX for informatica mappings?

0 Answers   CGI, CTC,


I have source like this 1:2;3. so i want to load the target as 123

4 Answers   HP,


How union transformation is used?

0 Answers  


how can we load 365 flat file to a single fact table (target) as a history load in single mapping?

2 Answers  






i have oracle table A and target B. i don't know how many records. i want get get last record in table A as first record in target table B. write a sql query?

7 Answers   IBM, TCS,


what is the difference between Informatica7.1 & informatica 8.1

4 Answers  


HI Experts, What is BULK mode and NORMAL mode, Which one gives better performance. How? Please Explain with an example...! It will help's me a lot. Thanks In advance.

8 Answers   CTS,


suppose i have 1000 records and i want to load half of the record in target 1 and half in target2.how u'll do?

9 Answers   IBM,


Explain sessions?

0 Answers  


If my source is having 30 million records, so obviously the cache could not be allocated with sufficient memory. What needs to be done in this case?

2 Answers   TCS,


Limitation of REPLACESTR. Is there any character limitation to it.

1 Answers   CTS,


Categories