1.基本语句: .查询每个部门工资最高的人的详细记录 select * from emp e,(select max(sal) max,deptno from emp group by deptno)t where e.deptno = t.deptno and e.sal = t.max; .查询每个部门信息和该部门的员工数量 select d.deptno,d.dname,p.per from dept d ,(select count(*) per,deptno from emp grou…