Q&A for Drupal developers and administrators
SELECT COUNT(DISTINCT RevisionGUID) AS Count, h.UserId AS [User Link], h.UserDisplayName FROM PostHistory h JOIN Posts p ON h.PostId=p.Id WHERE (p.PostTypeId in (1,2)) ---only questions and answers AND (h.PostHistoryTypeId in (1,2,3,4,5,6,7,8,9)) ---only edit and rollbacks GROUP BY h.UserId, h.UserDisplayName ORDER BY COUNT(DISTINCT RevisionGUID) DESC