今天面试的一道SQL题目,求解答
表EMP字段name , dep , salary
求部门人员大于10的部门工资总和 下午想了快3分钟,就是想不明白,结果悲剧了,现在貌似明白了
select dep,sum(salary)
from emp
group by dep
having count(name)>10
貌似是这样吧~真悲剧 求部门人员大于10的部门工资总和
select dep,sun(salary) from EMP group by dep having count(name)>10;
页:
[1]