SELECT `渠道名称` , SUM(`当日其他`) AS 当月其他 FROM `渠道信息` as A , `一线数据汇总` AS B WHERE A.`渠道名称` = B.`渠道名称` GROUP BY `渠道名称`
错误原因:表A和表B里都有'渠道名称',select时要指明是哪个表里的。
SELECT A.`渠道名称` , SUM(`当日其他`) AS 当月其他 FROM `渠道信息` as A , `一线数据汇总` AS B WHERE A.`渠道名称` = B.`渠道名称` GROUP BY `渠道名称`
OK
可以先写from,再写select什么。