Query to select duplicates.