sql按年按月按日按星期统计汇总订单数据sql代码
代码语言:sql
所属分类:查询
代码描述:sql按年按月按日按星期统计汇总订单数据sql代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
#按月统计订单报表sql查询语句 #select MONTH(FROM_UNIXTIME(addtime)) as month,count(*) as total from Userorder group by month; #按季度 #select QUARTER(FROM_UNIXTIME(addtime)) as quarter,count(*) as total from Userorder group by quarter #按周 #select WEEK(FROM_UNIXTIME(addtime)) as week,count(*) as total from Userorder group by week #按年 #select YEAR(FROM_UNIXTIME(addtime)) as ye.........完整代码请登录后点击上方下载按钮下载查看
网友评论0