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




Пример 15.15.1


WITH DEPT_MAX_SAL (MAX_SAL, TOTAL_EMP) AS

(SELECT MAX (EMP_SAL), COUNT (*)

FROM EMP

WHERE DEPT_NO IS NOT NULL

GROUP BY DEPT_NO)

SELECT SUM (TOTAL_EMP), MAX_SAL

FROM DEPT_MAX_SAL

GROUP BY MAX_SAL;




Содержание  Назад  Вперед