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 to retrive the employees whose sal is greater than avg
sal

Answer Posted / viren

since we are using aggregate function AVG, we have to use
GROUP BY, HAVING clause.

select empName, avg(sal) from employees group by sal having
sal > avg(sal) order by empName;

Is This Answer Correct ?    4 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does select count (*) mean in sql?

1075


what is a database lock ? : Sql dba

1226


What are literals in sql server?

1259


What are the topics in pl sql?

1023


What is procedure in pl sql?

1090


What are some emotional triggers?

1035


what is data control language? : Sql dba

1068


Mention what problem one might face while writing log information to a data-base table in pl/sql?

1287


How do I remove all records from a table?

1117


how to enter binary numbers in sql statements? : Sql dba

1012


Does sql support programming?

1115


what is a database transaction? : Sql dba

1258


Explain the working of primary key?

1154


What is a natural join sql?

1039


What are expressions?

1062