mysql 查询近12月销售额

select
date_format(or_datetime, '%Y-%m') as month, sum(or_total_amount) as totalmoney
from tb_order
group by date_format(or_datetime, '%Y-%m')

猜你喜欢

转载自blog.csdn.net/ls1120623840/article/details/89578479