in Technology by

How do you load more than 1 Max Sal in each Department through Informatica or write sql query in oracle?

1 Answer

0 votes
by

SQL query:

You can use this kind of query to fetch more than 1 Max salary for each department.

SELECT * FROM (

SELECT EMPLOYEE_ID, FIRST_NAME, LAST_NAME, DEPARTMENT_ID, SALARY, RANK () OVER (PARTITION BY DEPARTMENT_ID ORDER BY SALARY) SAL_RANK FROM EMPLOYEES)

WHERE SAL_RANK <= 2
Sql-query-informatica-interview-questions

Informatica Approach:

We can use the Rank transformation to achieve this.

Use Department_ID as the group key.
Rank-transformations-informatica-interview-questions

In the properties tab, select Top, 3.
Properties-tab-informatica-interview-questions

The entire mapping should look like this.
Mapping-2-informatica-interview-questions

This will give us the top 3 employees earning maximum salary in their respective departments.

Related questions

0 votes
    A number of cats got together and decided to kill between them 999919 rats. Every cat killed an equal number of rats. Each cat ... cat killed ? A) 1009 B) 991 C) 2000 D) 1000...
asked Feb 12, 2021 in Education by JackTerrance
0 votes
    A_____ is a query that retrieves rows from more than one table or view: (a) Start (b) End (c ... Join Operations topic in chapter Query Processing Techniques of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    Each tablespace in an Oracle database consists of one or more files called (a) Files (b) name space ... , Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    I have text stored in a database table, many short rows about 70-90 characters long fields. (of ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 2, 2022 in Education by JackTerrance
0 votes
    I have text stored in a database table, many short rows about 70-90 characters long fields. (of ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    In a Linux-based system, the accounts may be members of 1 or more than one group. (a) True (b) False This ... , Cyber Security questions and answers pdf, mcq on Cyber Security pdf,...
asked Nov 4, 2021 in Education by JackTerrance
0 votes
    I'm trying to execute a SOQL query using Salesforce REST API which will return 2,749 results. However, it seems ... the REST API. Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    Write the Unconnected lookup syntax and how to return more than one column....
asked Mar 29, 2021 in Technology by JackTerrance
0 votes
    To build SQL statements it is more secure to user PreparedStatement than Statement. (1)True (2)False...
asked May 15, 2021 in Education by JackTerrance
0 votes
    How do you load first and last records into target table? How many ways are there to do it? Explain through mapping flows...
asked Mar 28, 2021 in Technology by JackTerrance
0 votes
    How do you load alternate records into different tables through mapping flow?...
asked Mar 28, 2021 in Technology by JackTerrance
0 votes
    How do you load only null records into target? Explain through mapping flow....
asked Mar 28, 2021 in Technology by JackTerrance
...