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


Пример 15.11


SELECT DEPT_NO, AVG (CURRENT_DATE - EMP_BDATE)

FROM EMP

WHERE DEPT_NO IS NOT NULL

GROUP BY DEPT_NO

HAVING AVG (CURRENT_DATE - EMP_BDATE)< SOME

(SELECT AVG (CURRENT_DATE - EMP1.EMP_BDATE)

FROM EMP EMP1

WHERE EMP1.DEPT_NO IS NOT NULL

GROUP BY EMP1.DEPT_NO);




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



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