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 ADDM Advisor in Oracle?
In oracle there is column command, how will you explain that?
What is the string concatenation operator in oracle?
What is coalesce function?
In which language oracle has been developed?
How to update values in a table in oracle?
What is a subquery?
How would you go about verifying the network name that the local_listener is currently using?
Which is better Oracle or MS SQL? Why?
How to store only time; not date and time?
How to convert csv to table in oracle?
What to do if the binary spfile is wrong for the default instance?
What are the differences between lov and list item?
How do you tell what your machine name is and what is its IP address?
Is there an oracle sql query that aggregates multiple rows into one row?