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

How can you create an empty table from an existing table?

1040


How do I create a memory optimized filegroup?

917


How can you view the errors encountered in a trigger?

924


How do I view a table in sql?

969


What is trigger types of trigger?

1013


What does the hierarchical profiler does?

1020


How do I run pl sql in sql developer?

1082


What will you get by the cursor attribute sql%found?

924


Is left join faster than join?

1000


What is structural independence and why is it important?

994


What is cursor and its types?

1021


What are the parameter modes supported by pl/sql?

1039


How to find 3rd highest salary of an employee from the employee table in sql?

1050


Can there be 2 primary keys in a table?

965


what is a unique key ? : Sql dba

1052