I'm fairly new with SQL. I have 2 data extensions. DE1 is a list of email addresses and changes each day. DE2 is for counting how many times each address appears in DE1.
So, my question is, how would I create a SQL query that follows this logic:
- For each email address in DE1
- If exists in DE2, count = count + 1
- If doesn't exist in DE2, create new row adding email address and count = 1
I hope this makes sense. I appreciate any help you can provide. Thanks!