select deptno,sum(sal) as tsal
from scott.emp a
group by a.deptno
having job in 'salesman' and 'clerk;
|
Newbie Member
|
|
| 14May2010,11:32 | #1 |
|
select deptno,sum(sal) as tsal
from scott.emp a group by a.deptno having job in 'salesman' and 'clerk; |
|
Newbie Member
|
|
| 14May2010,15:50 | #2 |
|
corrected by myself
select deptno, sum(sal) as tsal from scott.emp a where job in ('SALESMAN','CLERK') group by a.deptno; |