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
Why do we use bulk collect in oracle?
Is oracle an operator?
Why we use bulk collect in oracle?
How to get a create statement for an existing table?
Explain a synonym?
Point out the difference between user tables and data dictionary?
What is an oracle wallet?
What are the advantages of oracle 12c?
How to create an oracle database?
Can select statements be used on views in oracle?
Explain what are the uses of rollback segment?
What is instant client oracle?
11. Display the client number and name and the client number and name of the person who referred that client.
Where is the export dump file located?
How to store only time; not date and time?