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 have a table
eno dno sal
1 10 200
2 10 150
3 10 100
4 20 75
5 20 100

i want to get sal which is less than the avg sal of thri dept.

eno dno sal
2 10 150
3 10 100
4 20 75

Answer Posted / rutujagabhane

select salary from emp
wher dno in (select dno
from dept
where salary < any
(select avg(salary)
from dept
where dept = 3)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I send sql query results to excel?

1008


How many types of triggers exist in pl/sql?

1011


What is the location of pre_defined_functions.

1114


What is #table in sql?

1001


Write an sql query to select all records from the table?

971


Why do we need a foreign key?

1025


What is pls integer?

987


What are sql functions? Describe the different types of sql functions?

1061


What is the difference between sql, mysql and sql server?

1018


What is the difference between mdf and ndf files?

1063


Why self join is used in sql?

920


Define commit?

946


Which column of the user triggers data dictionary view displays the database event that will fire the trigger?

973


What is the difference between left and left outer join?

896


what is a scheduled jobs or what is a scheduled tasks? : Sql dba

913