您的位置:首页 > 其它

查询每个部门工资最低的两个员工的编号,姓名,工资

2017-10-14 16:28 423 查看
select deptno, ename, sal
from emp e1
where
(
select count(*)
from emp e2
where e2.deptno=e1.deptno and e2.sal<e1.sal
) <2
order by deptno, sal;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐