1,查询的顺序 SELECT empid, YEAR(orderdate) AS orderyear, COUNT(*) AS numorders FROM Sales.Orders GROUP BY empid, YEAR(orderdate) ORDER BY empid, orderyear; 上面的语句执行的逻辑顺序如下: 1. FROM2. WHERE3. GROUP BY4. HAVING5. SELECT6. ORDER BY 解释如下: 1. Queries the rows f…