I have written this query in Automation Studio SQL query activity to retrieve data for unique opens in last 30 days. However i am getting this syntax error while trying to validate. Not sure why
An error occurred while checking the query syntax. Errors: Incorrect syntax near the keyword 'Values'
SELECT p.Subscriberkey, q.count AS Values
FROM _Subscribers p
LEFT JOIN (
SELECT
Subscriberkey,
Count(*) as 'count'
FROM _Open
where IsUnique = 'True'
and EventDate > DateAdd(Day, -30, Getdate())
Group by Subscriberkey
) q on p.Subscriberkey = q.Subscriberkey
Can someone help, please?
Values
may be a reserved word that you cannot use.