I am doing some maintenance on our email user database. I have the following statement that selects the latest email from the duplicate emails.
MAX(USERID) AS LatestUserID
Count(EmailAddress) > 1
What I want to do, is in the SAME statement, select all the emails that are not duplicates. So I have a unique email address on each row.
Thanks in advance