I'm trying to create a SQL Query which counts the same values in a Data extensions and Groups them by a Unique Value.
Usecase: My data extension looks like this:
I want to see how many email addresses have used the same UniqueCode. Currently I have the following SQL running, but somehow he doesn't show me the count of a UniqueCode:
SELECT COUNT(distinct email) as test1 , UniqueCode AS test2 FROM DataExtension GROUP BY UniqueCode
The target Data Extension does contain the email and UniqueCode field, but I only receive the UniqueCodes or email.
Can someone help me?
Here is a screenshot on how I have it in mind: