因为select在order by之前运行,如果select中不包含count列,order by的时候就会因为没有这一列而执行失败。 参考资料 https://builtin.com/data-science/sql-order-of-execution https://learnsql.com/blog/sql-order-of-operations/ https://towardsdatascience.com/the-6-steps-of-a-sql-select-statement-proces...
1、FROM:对FROM子句中的左表<left_table>和右表<right_table>执行笛卡尔积,产生虚拟表VT1; 2、ON:对虚拟表VT1应用ON筛选,只有那些符合<jion_condition>的行才被插入虚拟表VT2中; 3、JOIN:如果指定了OUTER JOIN(如LEFT OUTER JOIN、RIGHT OUTER JOIN),那么保留白哦中未匹配的行作为外部行添加到虚拟表VT2中,产...