mysql根据月份统计金额
select FROM_UNIXTIME(createTime/1000,'%Y年%m月') as '时间',count(orderid) as '订单数量',sum(hasAmount*0.01) as '订单总额' from buyorder
where state not in(1,-1) GROUP BY FROM_UNIXTIME(createTime/1000,'%Y年%m月')
select FROM_UNIXTIME(createTime/1000,'%Y年%m月') as '时间',count(orderid) as '订单数量',sum(hasAmount*0.01) as '订单总额' from buyorder
where state not in(1,-1) GROUP BY FROM_UNIXTIME(createTime/1000,'%Y年%m月')
暂无评论。
评论功能维护中,当前仅展示历史评论。