Query for second maximum salary in each in each department
Answer Posted / gopinath
select department_id, salary from
(select department_id, salary, rank() over(partition by
department_id order by salary desc) r from employees) where r=2;
cheers;
Is This Answer Correct ? | 35 Yes | 13 No |
Post New Answer View All Answers
What are pl sql procedures?
1. is it possible to use the cursor atttibutes (%found ,% rowcount , %isopen , %notfound ) to our user defined cursor names ....... cursor cursor_name is select * from scott.emp if you use... cursor_name%found , %rowcount ,%isopen,%notfound...will it work... -------------------------- 2.what is the difference between the varray and index by table .. -------- 3. type type_name is table of number(8,3) index by binary_integer; identifier_name type_name; first , last , prior , next ,trim are the methods we can use it for the above type...simillary is there any way to apply for cursors... with thanks and regards..sarao...
What are the three pl sql block types?
What is sql table?
What are the possible values that can be stored in a boolean data field?
How do you rename a table in sql?
What is user in sql?
How can use stored procedures in sql?
Why do we create stored procedures & functions in pl/sql and how are they different?
Is sql port 1433 encrypted?
What are different types of triggers?
How do I save the results of sql query in a file?
Can we write ddl statements in functions?
What is asqueryable?
What is graph sql?