-- 每日单量
select DATE_FORMAT(createtime,'%Y-%m-%d') as days,count(*) count from ibt_shop_order group by days; -- 每周单量
select DATE_FORMAT(createtime,'%Y-%u') as weeks,count(*) count from ibt_shop_order group by weeks; -- 每月单量
select DATE_FORMAT(createtime,'%Y-%m') as months,count(*) count from ibt_shop_order group by months; ---------------------
作者:可爱的小莱
来源:CSDN
原文:https://blog.csdn.net/jiftlixu/article/details/54575742
版权声明:本文为博主原创文章,转载请附上博文链接!
05-11 03:31