-- 不足10 的月份前面补0:

  1. Select Right(100 + Month(需要获取月份的时间), 2)

  2. date_format(event_time,'%Y-%m')

select concat(year(event_time),'-',Right(100 + Month(event_time), 2)) as month,
       sum(total_amount) as GMV
from tb_order_overall
where status in (0,1) and year(event_time)=2021
group by month
having GMV > 100000
order by GMV asc