mysql 日期格式轉換格式化

創建時間小於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);

 

發佈了130 篇原創文章 · 獲贊 63 · 訪問量 46萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章