1.执行顺序:
(1)from (2) join (3) on (4) where (5)group by (6) avg,sum.... (组函数) (7)having (8) select (9) distinct (10) order by
2.聚合函数(sum,avg,max,min,count)结果作为筛选条件时,不能用where,而是用having语法
1.执行顺序:
(1)from (2) join (3) on (4) where (5)group by (6) avg,sum.... (组函数) (7)having (8) select (9) distinct (10) order by
2.聚合函数(sum,avg,max,min,count)结果作为筛选条件时,不能用where,而是用having语法