select 语法的处理顺序
FROM
ON
JOIN
WHERE
GROUP BY
WITH CUBE or WITH ROLLUP
HAVING
SELECT
DISTINCT
ORDER BY
TOP
注意 join 可以将where 添加放到 on 中,left join 中where条件无法放到on中,尽量 先筛选再left join
select 语法的处理顺序
FROM
ON
JOIN
WHERE
GROUP BY
WITH CUBE or WITH ROLLUP
HAVING
SELECT
DISTINCT
ORDER BY
TOP