标签:子查询 group by sel _id 注释 create class 查询 color
UPDATE `0220数据统计` AS a SET a.`T+7复购金额` = ( SELECT ROUND(SUM(b.real_pay) / 10000, 2) AS 累计消费金额 FROM arm_changsha.goods_sales AS b LEFT JOIN arm_changsha.ms_member_def AS c ON c.id = b.member_id WHERE c.mobile = a.`手机号码` AND b.create_date >= ‘2019-01-14 00:00:00‘ AND b.create_date <= ‘2019-01-27 23:59:59‘ AND b.sales_type = ‘1‘ GROUP BY b.member_id );
报错误,返回子查询返回多条。 注释掉就可以。数据问题。
GROUP BY b.member_id
标签:子查询 group by sel _id 注释 create class 查询 color
原文地址:https://www.cnblogs.com/sakura3/p/10405379.html