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 
   COUNT(CASE WHEN ph.PostHistoryTypeId = 4 THEN 1 ELSE NULL END) AS Edits_Title,
   COUNT(CASE WHEN ph.PostHistoryTypeId = 5 THEN 1 ELSE NULL END) as Edits_Body,
   COUNT(CASE WHEN ph.PostHistoryTypeId = 6 THEN 1 ELSE NULL END) as Edits_Tags
FROM PostHistory ph
WHERE 
  ph.UserId = ##UserId:int?11212## AND
  ph.PostHistoryTypeId in (4, 5, 6) AND
  YEAR(ph.CreationDate) = 2024

Enter Parameters

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