I was trying to tell you that you need to define what you consider to be a duplicate first. Is it questions with the same title? Questions with the same content? Matching fragments? Questions posted on the same day? Yes, I'm aware that the last one is ridiculous. I'm exaggerating here to emphasize that without a clear definition of what a duplicate is you cannot craft a routine to remove them.