# 已付款订单:status=1 # 未付款的订单:status=0 # gmv:已付款+未付款==status=1and status=0 # where status!=2 select date_format(event_time,"%Y-%m") as month, round(sum(total_amount),1) as 'GMV' from tb_order_overall where status!=2 and year(event_time)='2021' group by date_format(event_time,"%Y-%m") having GMV>100000 order by GMV