Average reputation and posts per user, broken down by user's quintile of activity

1

Please login or register to vote for this query.

(click on this box to dismiss)

Code Review

Q&A for peer programmer code reviews

SELECT Id AS [User Link],
       *
    FROM
    (
        SELECT Users.Id,
               PostTypeId,
               COUNT(PostTypeId) AS PostCount
            FROM Users
                JOIN Posts
                    ON Posts.OwnerUserId = Users.Id
            WHERE
                Users.Id <> -1  -- Exclude 'Community' pseudo-user
            GROUP BY Users.Id, PostTypeId
    ) AS U
    ORDER BY Id, PostTypeId;

Enter Parameters

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