select deptno, count(*)
from employees
group by deptno
having deptno <= 20;
DEPTNO COUNT(*)
-------- --------
10 3
20 5
select deptno, count(*)
from employees
where deptno <= 20
group by deptno;
DEPTNO COUNT(*)
-------- --------
10 3
20 5
from employees
group by deptno
having deptno <= 20;
DEPTNO COUNT(*)
-------- --------
10 3
20 5
select deptno, count(*)
from employees
where deptno <= 20
group by deptno;
DEPTNO COUNT(*)
-------- --------
10 3
20 5