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
答案 0 :(得分:6)
您需要指定列来自的表,因为两个表中都存在相同的列名。
即。使用Group By A.SubscriberKey
就像SELECT
列表中那样。
此外,除MySQL之外的所有RDBMS都要求您将B.CreatedDate
添加到GROUP BY
列表中,因为它位于SELECT列表中
答案 1 :(得分:0)
您有多个包含以该名称命名的列的表,因此您需要指定包含Group By SubscriberKey
中引用的列的表:
Group By A.SubscriberKey