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...

consider a table which contain 4 columns,ename,eno,sal and
deptno, from this table i want to know ename who having
maximum salary in deptno 10 and 20.

Answer Posted / anil pednekar

select table1.ename from (select deptno, max(sal) as sal1
from table1 group by deptno having deptno in(1,2)) as T1,
table1 where T1.deptno=table1.deptno and
T1.sal1=table1.sal

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does access use sql?

1018


What is sql and explain its components?

1043


What are %type and %rowtype for?

1042


What is record in pl sql?

1060


what is view? : Sql dba

942


How do you go back in sql?

974


what is foreign key? : Sql dba

1001


How can we store rows in PL/SQL using array?

1202


How do you concatenate in sql?

1013


What does the sign mean in sql?

967


Can you have a foreign key without a primary key?

938


Is foreign key mandatory?

988


How to revise and re-run the last sql command?

1146


How insert into statements in sql?

1057


What language is oracle sql developer?

987