Tuesday, August 10, 2010

SQL:List the employees whose salary is greater than their department avg salary

select * from emp e where sal > (select avg(sal) from emp where deptno=e.deptno);

No comments:

Post a Comment