1,查询工作和工资完全与MARTIN相同的员工
select * from emp where (job,sal)in (select * from emp where ename=’MARTIN’)
2.查询有俩个以上直接下属的员工信息
select mgr, count(mrg) from emp group having count(mgr)>2
3.求各个部门薪水最高的员工的信息
SELECT e1.* FROM emp e1,(select deptno,MAX(sal) msal from emp GROUP BY deptno) e2
WHERE e1.deptno=e2.deptno and e1.sal=e2.msal