错误"Ambiguous column name SubscriberKey"


Select A.SubscriberKey, COUNT(DISTINCT EventDate) AS Count,B.CreatedDate
From _Open A
JOIN _ListSubscribers B
ON A.SubscriberKey = B.SubscriberKey
Where B.ListID = '10630'
Group By SubscriberKey
HAVING COUNT(DISTINCT EventDate) = 1

您需要指定列来自的表,因为两个表中存在相同的列名。

即使用Group By A.SubscriberKey,因为这是您在SELECT列表中拥有的内容。

此外,除MySQL之外的所有RDBMS都将要求您还将B.CreatedDate添加到GROUP BY列表中,因为它在SELECT列表中。

您有多个表包含以该名称命名的列,因此您需要指定包含Group By SubscriberKey中引用的列的表:

Group By A.SubscriberKey

相关内容

最新更新