I have one table :EID,Depid,ename,sal
I want to have max(sal) in each department.
Answer Posted / narasimha
select e.eid,e.sal,e.depid,e.ename,e.sal from emp e
where 1>(select count(*) from emp w where e.sal<w.sal and
e.depid=w.depid) order by e.deptno asc
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is the quickest way to export a table to a flat file?
How to define an external table with a text file?
What is Data Dictionary Cache in Oracle?
How to use "startup" command to start default instance?
Explain the truncate in oracle?
In the oracle version 9.3.0.5.0, what does each number shows?
How can I see all tables in oracle?
How to delete a column in an existing table?
Which is faster join or subquery in oracle?
How to divide query output into groups in oracle?
How do I limit the number of oracle database connections generated by weblogic server?
Is oracle an open source?
What is the difference between pre-select and pre-query?
Please explain joins in oracle?
What operating systems are supported by oracle database 10g xe?