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 need department wise top 2 employees salary.which logic
i will use

Answer Posted / shreya

select level,deptno,max(sal)
from emp
where level in (1,2)
connect byy prior sal>sal
group by level,deptno
order by deptno

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you use a while loop in pl sql?

1055


Is it important to partition hard disk?

1069


What is an index? What are the types of indexes? How many clustered indexes can be created on a table?

1132


Why procedure is used in sql?

1087


How can you maintain the integrity of your database on instances where deleting an element in a table result in the deletion of the element(s) within another table?

1177


Which is better cte or subquery?

1076


Is the primary key an index?

1078


Is sqlite thread safe?

1102


What is the difference between the repeatable read and serializable isolation levels? : Transact sql

1184


Does execute immediate commit?

1291


Why plvtab is considered as the easiest way to access the pl/sql table?

1292


what does it mean to have quoted_identifier on? : Sql dba

1181


how many columns can be used for creating index? : Sql dba

987


Explain two easy sql optimizations.

1075


What are the different operators available in sql?

1057