i need department wise top 2 employees salary.which logic
i will use
Answer Posted / kavitha
SELECT distinct a.department_id, a.salary
FROM (SELECT department_id, salary,
DENSE_RANK () OVER (PARTITION BY department_id ORDER BY salary DESC NULLS LAST) max_sal
FROM employees
WHERE department_id IS NOT NULL) a
WHERE max_sal <= 2
Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Hi how to import oracle sequence in Informatica? Please write stored procedure code that will import oracle sequence in Informatica SP transformation as per below scenario Oracle table product list Pro_id, pro_name 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights Now a new flat file with new product list needs to be added to oracle table product list with oracle sequence. flat file product Prono,pro_name, 1, 20 watt tube light 2, 30 watt tube light & target should be like 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights. 104, 20 watt tube light 105, 30 watt tube light thks reg suvarna joshi suvarnaatsuvarna@rediffmail.com
What is rank () in sql?
Give the order of sql select?
What are different methods to trace the pl/sql code?
Which data type is a composite type?
Can you inner join the same table?
What is triggering circuit?
Explain cursor types?
How do I edit a stored procedure?
How would you reference column values before and after you have inserted and deleted triggers?
How do you sort in sql?
how to select unique records from a table? : Sql dba
Can we rollback truncate?
What is basic structure of pl sql?
List different type of expressions with the example.