UPDATE user_online_month_atu aINNER JOIN (SELECTuser_id,sum(c.online_times) as online_times,SUM(c.login_count) as login_count,Sum(c.view_page_count) as view_page_count,LEFT(c.log_date,length(c.log_date) - 2) as dateFROMuser_online_time_atu cGROUP BYc.user_id ,date) b ON a.user_id = b.user_id AND a.`month`=b.dateSET a.online_time = b.online_times ,a.login_count=b.login_count,a.view_page_count=b.view_page_count
UPDATE user_online_month aINNER JOIN (SELECTuser_id,sum(c.online_times) as online_times,SUM(c.login_count) as login_count,Sum(c.view_page_count) as view_page_count,LEFT(c.log_date,length(c.log_date) - 2) as dateFROMuser_online_time cGROUP BYc.user_id ,date) b ON a.user_id = b.user_id AND a.`month`=b.dateSET a.online_time = b.online_times ,a.login_count=b.login_count,a.view_page_count=b.view_page_count;