i want department wise maxmum salary and empolyee name

Answer Posted / satya

select empno,max(sal) sal,deptno from emp where empno in
(select e.empno from emp e where e.sal=(select max(a.sal) from
emp a where deptno=e.deptno)) group by deptno,empno;

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the parameters that we can pass through a stored procedure?

551


How many categories of data types in oracle?

600


Can we use bind variables in oracle stored procedure?

485


what is IDE,DMV in sql server?

2237


What is literal?

583






How to select all columns of all rows from a table in oracle?

588


How to invoke the original export import utilities?

503


What is an Oracle Instance?

683


What is the relationship among database, tablespace and data file?

534


Hi Masters, in Oracle Applications 11i, we hace 2 functions using the same form, i need to create 1 personalization, but that code must afect only one function.... how can i do that?

1771


What happens internally when the user types userID/password@string in SQL PLUS Thanks-Bhaskar

3821


Can we store pictures in the database and if so, how it can be done?

584


what is the use of triggers in Java program? I mean where do we use triggers in Java programming?

1691


How to upsert (update or insert into a table)?

536


What is sequence?

622