I'm looking to add a field (LAST_OPENED) to a Data Extensions I created.
ET Subscriber has the records with all the fields needed but I was passed a list with out the (LAST_OPENED) field, I want to JOIN the two so the QUERY matches the records in ET Subscriber to the ones in my Data Extensions and adds (LAST_OPENED) as a result.
Here is the query I tried:
SELECT t.* FROM (SELECT A.*, ROW_NUMBER() OVER (PARTITION BY A.[LAST_OPENED] ORDER BY A.[LAST_OPENED]) as rn FROM Ent.[ET Subscriber] A INNER JOIN [B_Med_Invitations_Audience20170531] B ON A.[LAST_OPENED] = B.[LAST_OPENED] ) as t WHERE t.rn = 1