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 are the advantages of sql ? : Sql dba
Why is stored procedure faster than query?
What are the differences between in and exists clause?
define sql update statement ? : Sql dba
What is number function in sql?
How does join work in sql?
What does 0 mean in sql?
Can we use ddl statements in stored procedure sql server?
What are different types of tables in sql?
how to use in conditions? : Sql dba
What is pl sql block in dbms?
What is the difference between left outer join and left join?
How can a pl sql block be executed?
Explain the difference between 'between' & 'and' operators in sql
What is the starting oracle error number?