Hey all,
If the names repeated is more than 6 and there are six different addresses for that same name, then I don't want to output them to the KeepThese table:
harry baker 1 street
harry baker 2 street
harry baker 3 street
harry baker 4 street
harry baker 5 street
harry baker 6 street
donald ross 11th street
So harry baker should be excluded from new table. donald ross should be included in new table.
This is existing query that I have:
SELECT F.* INTO KeepThese
FROM final_output AS F
INNER JOIN (SELECT DISTINCT F.fullName FROM final_output
AS F LEFT JOIN (SELECT fullName FROM final_output
AS F GROUP BY fullName HAVING COUNT(*) >=6)
AS NamesToReject ON NamesToReject.fullName = F.fullName WHERE NamesToReject.ID IS NULL)
AS NamesToKeep ON NamesToKeep.fullName = F.fullName;
This returns "Enter Parameter Value NamesToReject.ID" But this is best I could come up with.
Thanks for response