一、样例SQL
SELECT
ENAME,MAX(SAL) AS MAX_SAL
FROM EMP
WHERE ENAME IS NOT NULL
GROUP BY ENAME
HAVING MAX(SAL) > 1000
ORDER BY MAX_SAL
二、执行顺序
1、FROM
2、WHERE
3、GROUP BY
4、MAX
5、HAVING
6、ORDER BY
一、样例SQL
SELECT
ENAME,MAX(SAL) AS MAX_SAL
FROM EMP
WHERE ENAME IS NOT NULL
GROUP BY ENAME
HAVING MAX(SAL) > 1000
ORDER BY MAX_SAL
二、执行顺序
1、FROM
2、WHERE
3、GROUP BY
4、MAX
5、HAVING
6、ORDER BY