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

Briefly explain what is literal? Give an example where it can be used?

998


ur a sql devoloper...what is the process in ur company for finding the database BUGS .. seperate DB testers are there? or devr.s are manage? if DB TESTERS in there what is the process

2230


can u send the sql dumps to sivakumarr1987@gmail.com plz help me

3021


What is a sub query and what are the different types of subqueries?

1091


What is the usage of save points in oracle database?

934


What is meant by recursive hints in oracle?

1052


Explain the difference between a procedure and a function? What do you understand by those terms?

1038


How do I start tns listener?

1007


What is a subquery in oracle?

1068


What is a server parameter file in oracle?

1028


Explain the characteristics of oracle dba?

1084


How to use an explicit cursor without open statements?

1026


What is Segment Advisor in Oracle?

1073


State all possible different index configurations a table can possibly have?

963


What is Virtual Private Database in Oracle?

1038