How Many Edits

0

Please login or register to vote for this query.

(click on this box to dismiss)

Shows the edit counts for a user, where the user was the most recent editor (meaning the results are conservative compared to the actual number of edits).

Computer Science Educators

Q&A for those involved in the field of teaching Computer Science

-- How Many Edits
-- Shows the edit counts for a user, where the user was the most recent editor
-- (meaning the results are conservative compared to the actual number of edits).

SELECT
    Id AS [User Link],
    (
        SELECT COUNT(*) FROM Posts
        WHERE
            PostTypeId = 1 AND
            LastEditorUserId = Users.Id AND
            OwnerUserId != Users.Id
    ) AS QuestionEdits,
    (
        SELECT COUNT(*) FROM Posts
        WHERE
            PostTypeId = 2 AND
            LastEditorUserId = Users.Id AND
            OwnerUserId != Users.Id
    ) AS AnswerEdits,
    (
        SELECT COUNT(*) FROM Posts
        WHERE
            LastEditorUserId = Users.Id AND
            OwnerUserId != Users.Id
    ) AS TotalEdits
    FROM Users
    WHERE Users.Id = 248756

Enter Parameters

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