My table consists of duplicate email addresses. Each email address has a unique create date and a unique ID. I want to identify the email address with the most recent create date and its associated ID and show the duplicate ID with its create date as well. I would like the query to show this in the following format:
- Column 1: EmailAddress
- Column 2: IDKeep
- Column 3: CreateDateofIDKeep
- Column 4: DuplicateID
- Column 5: CreateDateofDuplicateID
Note: There are instances where more than 2 duplicate email addresses exist. I would like the query to show each additional duplicate on a new row, re-stating the EmailAddress and IDKeep in these instances.
To no avail I've attempted to piece together different queries found on here. I'm currently at a loss--any help/direction would be greatly appreciated.