Use raw sql to get the accurate number of duplicate names