Number of Edits

1

Please login or register to vote for this query.

(click on this box to dismiss)

Shows the number of edits a specific user has made.

The Workplace Meta

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

-- Number of Edits
-- Shows the number of edits a specific user has made.

DECLARE @UserId int = ##UserId##

SELECT
(
  SELECT COUNT(*) FROM posts WHERE
    LastEditorUserId = @UserId AND
    OwnerUserId != @UserId AND
    PostTypeId = 1
) AS 'Question Edits',
(
  SELECT COUNT(*) FROM posts WHERE
    LastEditorUserId = @UserId AND
    OwnerUserId != @UserId AND
    PostTypeId = 2
) AS 'Answer Edits',
(
  SELECT COUNT(*) FROM posts WHERE
    LastEditorUserId = @UserId AND
    OwnerUserId != @UserId
) AS 'Total Edits'

Enter Parameters

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