Now that efforts are underway to reward duplicate finders, how may we find out how much duplicates we have successfully closed/close-voted so far?
I've tried this solution, but it doesn't seem to work (anymore):
Now that efforts are underway to reward duplicate finders, how may we find out how much duplicates we have successfully closed/close-voted so far?
I've tried this solution, but it doesn't seem to work (anymore):
Here is the query that shows you how often you found a duplicate that lead to the actual closure of the question with that reason. This only counts non-deleted posts and doesn't take re-openings into account. The count is split between "normal" duplicates and duplicates where you "hammered" a question due to a gold badge you own.
The PostHistory table in SEDE records in rows with PostHistoryTypeid = 10 the close event of a question. In the text column a JSON object is stored that holds the questionid and the close voters. With the SQL function JSON_Value you can parse and select properties out of that JSON text. Given there are in theory at most 5 close voters (but some cases exist where 6 or even 7 close voters are found) we can cross join with a set of numbers from 1 till 7 to get the individual close vote userid's.
select hammertag
, count(*) [#duplicates]
from
(
select JSON_value(text, concat(N'$.Voters[', value, N'].Id')) userid
, JSON_value(text, concat(N'$.Voters[', value, '].BindingReason.GoldTagBadge')) hammertag
from posthistory ph
cross join string_split(N'0,1,2,3,4,5,6,7',',')
where ph.posthistorytypeid = 10 -- closed
and comment in (1,101) -- duplicate close reasons
and JSON_value(text, concat(N'$.Voters[', value, N'].Id')) = '##userid:int?6574038##'
) data
group by hammertag
When run today, this is the result for your account:
Keep in mind SEDE is updated once a week on Sunday.
Give a big shout-out to Monica Cellio for the awesome SEDE Tutorial she wrote.
Say "Hi" in SEDE chat.
where hc.UserId = ..