Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the quickest way to export a table to a flat file?

968


How to define an external table with a text file?

1069


What is Data Dictionary Cache in Oracle?

1165


How to use "startup" command to start default instance?

1036


Explain the truncate in oracle?

967


In the oracle version 9.3.0.5.0, what does each number shows?

1302


How can I see all tables in oracle?

1011


How to delete a column in an existing table?

1076


Which is faster join or subquery in oracle?

995


How to divide query output into groups in oracle?

992


How do I limit the number of oracle database connections generated by weblogic server?

1070


Is oracle an open source?

1080


What is the difference between pre-select and pre-query?

1221


Please explain joins in oracle?

1062


What operating systems are supported by oracle database 10g xe?

1034