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

How do I decide when to use right joins/left joins or inner joins or how to determine which table is on which side?

971


What is the recommended interval at which to run statspack snapshots, and why?

2865


What is the quickest way to fetch the data from a table?

1005


How to select an oracle system id (sid)?

1020


Which is better Oracle or MS SQL? Why?

6269


How to turn on or off recycle bin for the instance?

1015


How to find out what oracle odbc drivers are installed?

980


What is the simplest tool to run commands on oracle servers?

961


What are the major difference between truncate and delete?

989


What are the limitations of check constraint?

966


Can we use bind variables in oracle stored procedure?

901


What is dual table oracle?

930


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

1127


Provide an example of a shell script which logs into SQLPLUS as SYS, determines the current date, changes the date format to include minutes & seconds, issues a drop table command, displays the date again, and finally exits.

2048


How do I use unicode codesets with the weblogic jdriver for oracle driver?

1016