UPDATE user_online_month_atu a INNER JOIN ( SELECT user_id, sum(c.online_times) as totalSum, LEFT(c.log_date,length(c.log_date) - 2) as date FROM user_online_time_atu c GROUP BY c.user_id ,date ) b ON a.user_id = b.user_id AND a.`month`=b.date SET a.online_time = b.totalSum
原文地址:https://www.cnblogs.com/deepalley/p/11018918.html
时间: 2024-11-05 14:50:53