题目是列出各个部门的manager的最低薪资
正确答案是
select deptno 部门号,min(sal)
from emp
where job = 'manager'
group by deptno;
我用的是
select deptno 部门号,min(sal)
from emp
group by deptno
having job = 'manager';
报错,having不是也可以用来过滤吗?请问我这种错在哪里?
题目是列出各个部门的manager的最低薪资
正确答案是
select deptno 部门号,min(sal)
from emp
where job = 'manager'
group by deptno;
我用的是
select deptno 部门号,min(sal)
from emp
group by deptno
having job = 'manager';
报错,having不是也可以用来过滤吗?请问我这种错在哪里?