I have the following SQL query activity in Marketing Cloud, which is producing an error: Old style JOIN (ANSI JOINs) syntax is not allowed.
SELECT CASE SurveyResponse
WHEN ''
THEN 'N/A'
ELSE SurveyResponse
END AS SurveyResponse
,(CONVERT(DECIMAL(3, 1), COUNT(*) * 100.0 / (SELECT COUNT(SubscriberKey) FROM DEName) )) as ResponsePercentage
,(SELECT COUNT(SubscriberKey) FROM DEName) as TotalUnsubscribes
FROM DEName
GROUP BY SurveyResponse
I don't understand why the SELECT COUNT(SubscriberKey) FROM DEName statement works in the last clause, but I can't use the same subquery for my "give me a percentage" clause?
Any ideas?
Thanks!