SELECT Id AS [User Link], Reputation AS ReputationA1, UpV...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Aviation

Q&A for aircraft pilots, mechanics, and enthusiasts

SELECT 
    Id AS [User Link],
    Reputation AS ReputationA1,
    UpVotes,
    DownVotes,
    Upvotes - DownVotes as TotalVotesA5,
   
    (
        SELECT COUNT(q.PostTypeId) 
        FROM Posts q
        WHERE
            PostTypeId = 1 AND
            OwnerUserId != Users.Id
    ) AS QuestionEditsA2,
    (
        SELECT COUNT(a.PostTypeId) 
        FROM Posts a
        WHERE
            PostTypeId = 2 AND
            OwnerUserId != Users.Id
    ) AS AnswerEditsA3,
    (
        SELECT COUNT (AcceptedAnswerId)
        FROM Posts
        WHERE
            PostTypeId = 1 AND
            LastEditorUserId = Users.Id AND
            OwnerUserId != Users.id
    ) AS AccepteAnswersA4,
    (
        SELECT COUNT(CommentCount) 
        FROM Posts
        WHERE
            LastEditorUserId = Users.Id AND
            OwnerUserId != Users.Id
    ) AS CommentCountA6,   
    (
        SELECT COUNT(FavoriteCount) 
        FROM Posts
        WHERE
            LastEditorUserId = Users.Id AND
            OwnerUserId != Users.Id
    ) AS FavoriteCountA7
    FROM Users
    ORDER BY Reputation DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results