创建时间小于201901的数据总和 格式化日期然后转换做对比
insert into result_month_overall_dimension(month_at,app_num)
select 201901,count(*) as app_num
from import_apps_data where date_format(date(create_time),'%Y%m') <= 201901
on duplicate key update
app_num = values(app_num);
来源:CSDN
作者:Alice_qixin
链接:https://blog.csdn.net/Alice_qixin/article/details/104408303