Number of edits on your own post

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT COUNT(DISTINCT PostHistory.RevisionGUID) as "Own edits", 
       Posts.Id as [Post Link]
FROM PostHistory, 
     Posts
WHERE
    PostHistory.PostId = Posts.Id
    AND
    PostHistory.PostHistoryTypeId <= 9
    AND
 -- skip initial post 
    PostHistory.PostHistoryTypeId != 2
    AND
    PostHistory.UserId = ##userid:int##
    AND
    Posts.OwnerUserId = ##userid:int##
    AND
    Posts.OwnerUserId = PostHistory.UserId
GROUP BY Posts.Id
ORDER BY "Own edits" DESC

Enter Parameters

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