groupby
来源:15-8 累计问题之第一部分功能实现
慕九州3016327
2021-03-13
老师可以group by month 而不是group by data_format(day,‘yyyy-MM’)吗,这俩有啥区别嘛
如:
1.select domain,data_format(day,‘yyyy-MM’) as month,sum(pv) from access
group by domain,month
2.select domain,data_format(day,‘yyyy-MM’) as month,sum(pv) from access
group by domain,data_format(day,‘yyyy-MM’)
写回答
1回答
-
Michael_PK
2021-03-13
有些引擎中 group by 没法使用别名
032021-03-15