Get employees have minimum salary in their departments.
SELECT ENAME, JOB, DEPTNO, SAL
FROM EMP
WHERE (SAL,DEPTNO) IN (SELECT MIN(SAL), DEPTNO
FROM EMP
GROUP BY DEPTNO)
Get employees have minimum salary in their departments.
SELECT ENAME, JOB, DEPTNO, SAL
FROM EMP
WHERE (SAL,DEPTNO) IN (SELECT MIN(SAL), DEPTNO
FROM EMP
GROUP BY DEPTNO)
at 3:23 AM
Labels: Oracle, Oracle Query, PL/SQL
No comments:
Post a Comment