Select a.empname, a.empno, b.sal, b.deptno
From EMP a, (Select max (sal) sal, deptno from EMP group by deptno) b
Where a.sal=b.sal and a.deptno=b.deptno
No comments:
Post a Comment