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
What is a native sql query?
What is the usage of sql functions?
Why we use stored procedure instead of query?
What is type and rowtype in pl sql?
What is sql partition?
What are the types pl/sql code blocks?
What is use of term?
How to convert comma separated string to array in pl/sql?
When to use inner join and left join?
How to display Row Number with Records in Oracle SQL Plus?
What is the use of pl/sql table?
What is pls integer?
What is offset in sql query?
What is the location of pre_defined_functions.
What is the use of stored procedures?