I am updating my target data extension from the data extensions having multiple records by using sql query by union all in automation studio of marketing cloud.
my query is
SELECT FieldA, FieldB, FieldC FROM De1 UNION ALL SELECT FieldA, FieldB, FieldC FROM De2
This is working fine when both don't have duplicate records.
Now i want that when ever there is a duplicate record in these Data Extension the target Data extension must be updated with the latest records based on time.
Note - FieldC is a Date field that stores the time and date of records.
Here is the records of the data extension. See FieldA having duplicate records with same email twice. Now what i exactly want is when ever my query run it only updated with the latest entry that is firstname.lastname@example.org, Record 2 and Wednesday, July 31, 2019 10:45 AM must be added to target DE
Is That Posible ? or any other way to do this.
if yes then what should i add to update my query.