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