Professional Documents
Culture Documents
SQL Text
SQL Text
html
with jointab as (select e.ename, e.empno, d.deptno, d.dname from emp e, dept d
where e.deptno=d.deptno) select deptno, dname, count(empno) from jointab group by
deptno, dname;
(((Only deptno will cause error as whatever in select statement should be included
in group by clause too)))