Who's closest to getting Strunk and White and Copy Editor

0

Please login or register to vote for this query.

(click on this box to dismiss)

Counts the number of title and/or body revisions they've made on other people's non-deleted posts.

SharePoint

Q&A for SharePoint enthusiasts

-- Who's closest to getting Strunk and White and Copy Editor
-- Counts the number of title and/or body revisions they've made
-- on other people's non-deleted posts.

DECLARE @UserId int = ##UserId##

SELECT ph.UserId as [User Link], COUNT(DISTINCT ph.RevisionGUID)
    FROM PostHistory ph
    WHERE
        ph.PostHistoryTypeId IN (4, 5) AND
        ph.PostId NOT IN (SELECT p.Id FROM Posts p WHERE p.OwnerUserId = ph.UserId)
    GROUP BY ph.UserId
    ORDER BY COUNT(DISTINCT ph.RevisionGUID) DESC

Enter Parameters

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