Q&A for administrators, end users, developers and designers for Craft CMS
select top 500 hc.UserId [User Link], count(*) HammerClosed, count(hr.Id) Reopened, Round(count(hr.Id)*100.0/count(*),2) PctError 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 like '101%' and hc.Text like '%BindingReason":{"GoldTagBadge%' group by hc.UserId order by count(*) desc