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 is a native sql query?

999


What is the usage of sql functions?

1096


Why we use stored procedure instead of query?

965


What is type and rowtype in pl sql?

978


What is sql partition?

1050


What are the types pl/sql code blocks?

1085


What is use of term?

1015


How to convert comma separated string to array in pl/sql?

1133


When to use inner join and left join?

922


How to display Row Number with Records in Oracle SQL Plus?

1009


What is the use of pl/sql table?

1015


What is pls integer?

995


What is offset in sql query?

1085


What is the location of pre_defined_functions.

1129


What is the use of stored procedures?

994