Posts that get hammered closed, and what becomes of them

0

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Ubuntu

Q&A for Ubuntu users and developers

select count(HammerDupClosed) HammerDupClosed, count(case when HammerDupClosed is not null and Reopened is not null then 1 else null end) HammerDupReopened,
count(AskerDupClosed) AskerDupClosed, count(case when AskerDupClosed is not null and Reopened is not null then 1 else null end) AskerDupReopened,
count(OtherDupClosed) OtherDupClosed, count(case when OtherDupClosed is not null and Reopened is not null then 1 else null end) OtherDupReopened
from
(
  select (case when hc.Text like '%BindingReason":{"GoldTagBadge%' then 1 else null end) HammerDupClosed,
    (case when hc.Text like '%BindingReason":{"DuplicateApprovedByAsker%' then 1 else null end) AskerDupClosed, 
    (case when hc.Text not like '%BindingReason":{"GoldTagBadge%' and hc.Text not like '%BindingReason":{"DuplicateApprovedByAsker%' then 1 else null end) OtherDupClosed,
    hr.Id Reopened

  from PostHistory hc
  left join PostHistory hr on hr.PostId=hc.PostId and hr.CreationDate > hc.CreationDate and hr.PostHistoryTypeId=11
  where hc.PostHistoryTypeId=10
  and hc.Comment = '101'
  and hc.CreationDate > getdate()-365
) x

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results