ORA-00979: not a GROUP BY expression

select e.deptno,
d.deptno,sum(e.sal) from dept d,e emp
where d.deptno=e.deptno group by e.deptno

d.deptno,sum(e.sal) from d dept,e emp
*
ERROR at line 2:
ORA-00979: not a GROUP BY expression


GROUP BY clause should contain all the columns
(without group function) in the query

select e.deptno,
d.deptno,sum(e.sal) from dept d,emp e
where d.deptno=e.deptno group by e.deptno,d.deptno;

Comments

Popular posts from this blog

ORA-00923: FROM keyword not found where expected

How to make partitioning in Oracle more Quickly

Copy files between Unix and Windows with rcp