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 sqlca in powerbuilder?
What is linq to sql?
what is online transaction processing (oltp)? : Sql dba
Can we use join in subquery?
Why do we use view in sql?
What is trigger explain it?
what is a unique key ? : Sql dba
Can we use ddl statements in stored procedure sql server?
What are user defined functions?
What is left join in postgresql?
what is cursor and its type, what is ref cursor write a syntax to pass ref cursor into procedure out fucntion and call the procedure
Why is sql better than hql?
What are the uses of sysdate and user keywords?
What are the different sql commands?
what is the difference between rownum pseudo column and row_number() function? : Sql dba