标签:field lis python sele sum HERE select 渠道 div
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什么。
错误:Column 'Id' in field list is ambiguous
标签:field lis python sele sum HERE select 渠道 div
原文地址:https://www.cnblogs.com/soberkkk/p/12529912.html