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

select sal from demo where sal<(select avg(sal) from demo
where eno in (2,3,4));

NOTE:first create table demo and insert all these 5 rows
then run querry.
If any issue call me(PRASANT)

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there a pl/sql pragma similar to deterministic, but for the scope of one single sql select?

969


How to assign sql query results to pl sql variables?

992


What are predefined functions in sql?

978


What does count (*) do in sql?

952


what are all different types of collation sensitivity? : Sql dba

928


What is a primary key sql?

990


what are the nonstandard string types? : Sql dba

1083


What is pl sql in dbms?

900


Is sql injection illegal?

963


What is sql profiler in oracle?

1013


What is server name sql?

1068


What are records give examples?

953


how to return query output in html format? : Sql dba

1021


What is a procedure in pl sql?

1129


What is sql character function?

994