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 to drop an existing table in mysql? : Sql dba

1051


what is the difference between a web-garden and a web-farm? : Sql dba

1085


How does left join work in sql?

1009


What is informix sql?

985


How many sectors are in a partition?

1078


What is a trigger word?

1031


Does truncate free space?

1018


What is a data manipulation language?

1028


What is group function in sql?

1027


What is date functions?

1036


How to pipe multiline string to isql?

1009


What is scalar function?

1058


what is the difference between nested subquery and correlated subquery?

1059


what is the functionality of the function htmlentities? : Sql dba

970


What is java sql drivermanager?

1104