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

Query for second maximum salary in each in each department

Answer Posted / suneelkumar

select * from emp x where 2=(select count(distinct sal) from
emp y where x.sal<=y.sal) group by deptno;

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql used for?

1166


What is the maximum size of sqlite database?

1155


What are character functions in sql?

995


How do I tune a sql query?

1043


How to start oracle sql developer?

1076


I need a function for a train ticket reservation please answer it thanks in advance

1078


How do I run a pl sql procedure in sql developer?

1022


How to avoid duplicate records in a query?

1055


What is composite primary key in sql?

1043


What is an exception in PL/SQL? What are the two types of exceptions?

1401


what are the system privileges that are required by a schema owner (user) to create a trigger on a table?

1126


What problem one might face while writing log information to a data-base table in pl/sql?

1250


What is an implicit commit?

1103


how can we encrypt and decrypt a data present in a mysql table using mysql? : Sql dba

1245


Is left join inner or outer by default?

1074