Введение в модель данных SQL


Пример 15.5.1


SELECT DISTINCT DEPT_NO, (SELECT MIN(EMP1.EMP_SAL)

FROM EMP EMP1

WHERE EMP1.DEPT_NO = EMP.DEPT_NO),

(SELECT MAX(EMP1.EMP_SAL)

FROM EMP EMP1

WHERE EMP1.DEPT_NO = EMP.DEPT_NO)

FROM EMP

WHERE (SELECT AVG(EMP1.EMP_SAL)

FROM EMP EMP1

WHERE EMP1.DEPT_NO = EMP.DEPT_NO) BETWEEN

(SELECT AVG(EMP_SAL)

FROM EMP) AND 30000.00;




- Начало -  - Назад -  - Вперед -



Книжный магазин