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 / akula

select * from emp e1 where 2 =(select count(distinct(sal)) from emp e2 where e1.dno=e2.dno and e1.sal<=e2.sal);

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I write a sql query in pgadmin 4?

1039


What are character functions in sql?

988


How many postgresql users are there, worldwide?

1125


How do I find duplicates in sql?

976


What is data definition language?

1133


How to get each name only once from an employee table?

1153


What is difference between rank () row_number () and dense_rank () in sql?

1157


explain the delete statements in sql

1129


Is it important to partition hard disk?

1066


how many tables will create when we create table, what are they? : Sql dba

1110


What is the difference between database trigger and stored procedure?

1128


What does fetching a cursor do?

1129


What are sql objects?

1124


What is sql prepared statement?

1030


when MSQL8.0 is in market

2137