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


Пример 15.12


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) <= ALL

(SELECT AVG (CURRENT_DATE - EMP_BDATE)

FROM EMP

WHERE DEPT_NO IS NOT NULL

GROUP BY DEPT_NO);




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