Find top editors broken down by edit types

1

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace Meta

Q&A about the site for members of the workforce navigating the professional setting

select TOP 100
  ph.UserId,
--  ph.UserId as [User Link],
--  u.DisplayName,
--  YEAR(ph.CreationDate) as Year,
--  count(ph.Id) as Edits,
--  count(case when ph.PostHistoryTypeId = 5 then 1 else null end) as Body
  count(case when ph.PostHistoryTypeId = 6 then 1 else null end) as Tags
--  u.Reputation
from PostHistory ph
  left join Posts p on ph.PostId = p.Id
  left join Users u on ph.UserId = u.id
where 
--  ph.UserId = ##uid:int##
--  ph.UserId <> p.OwnerUserId and
  ph.PostHistoryTypeId in (4, 5, 6)
  and YEAR(ph.CreationDate) = 2024
--  and ph.UserId <> -1
  group by ph.UserId, YEAR(ph.CreationDate)
  -- having count(ph.id) > 1000

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results