Yes, after the match, after you've projected out variables, just use the max() aggregation.
...
WITH email1, email2, max(contactDateInStr) as latestDate
...
Aggregations are with respect to the non-aggregation variables which become the grouping key, so this is the max contact date string per each distinct email1, email2 combination.
hello everyone, I have a final result see below.. here i have UNION matched the 2 queries. but i required only the last result based on the nodetype. how to do this ??