3

Currently you can search for questions closed as duplicate by using a search option duplicate:1. What if to interpret this number as a number of origins? 0 and 1 are already working as expected, 2 might be used for questions with two or more targets, and so on...

Maybe there’s another way (by SEDE) to find such questions, but SEDE is slightly more hard to use for regular user (and works with outdated data). I think questions with multiple origins could be considered as suspicious:

  • Either it may covers multiple problems, and should be closed as too-broad
  • or the origins should be closed as duplicate of another one from the list (another case - they need to be improved).
3

You have two ways to determine duplicates with more then one target.

First there is the PostLinks table with rows LinkTypeId = 3

select postid as [Post Link]
, count(*) as [#number of dupes]
from postlinks
where linktypeid = 3 -- duplicate
group by postid 
order by 2 desc

Notice that this table isn't sanitized for deleted posts so you can find the id's of questions that are closed as duplicate but are now deleted.

Secondly there is PostHistory with PostHistoryTypeid = 10 where you have to parse the Text column for its OriginalQuestiondIds by means of JSON_Value.

select top 100 
  postid as [Post Link]
, json_value(text,'$.OriginalQuestionIds[0]') as [1]
, json_value(text,'$.OriginalQuestionIds[1]') as [2]
, json_value(text,'$.OriginalQuestionIds[2]') as [3]
, json_value(text,'$.OriginalQuestionIds[3]') as [4]
, json_value(text,'$.OriginalQuestionIds[4]') as [5]
from posthistory
where posthistorytypeid = 10
order by [5] desc
       , [4] desc
       , [3] desc
       , [2] desc
       , [1] desc

You can find both queries here.

  • Don’t work on SO, and AskUbuntu at least, got an error: “The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.” – αλεχολυτ Apr 16 at 18:17
  • @αλεχολυτ added a top 1000 to reduce the result set. – rene Apr 16 at 18:30
  • weird top result for SO, your script says about 5 targets, but only 3 is visible on site. stackoverflow.com/q/698626/3240681 – αλεχολυτ Apr 16 at 18:36
  • @αλεχολυτ that is an pre-2010 post and it got its duplicate header as an edit in the post. Those don't get updated. In the timeline I count 5: stackoverflow.com/posts/698626/timeline – rene Apr 16 at 18:49
  • is the list of duplicates for old post filled from the user comments? – αλεχολυτ Apr 16 at 19:28
  • @αλεχολυτ I'm unsure how it exactly works. I do know it needs a re-open / re-close if you want to have the new style of duplicate notice to show. – rene Apr 16 at 19:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .