Average question score by reputation (including deleted posts)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Doesn't actually work. Deleted posts in the data dump don't include user ids. See https://data.stackexchange.com/stackoverflow/query/544929/ instead.

Moderators

Q&A for community managers, administrators, and moderators

-- Doesn't actually work. Deleted posts in the data dump don't include user ids
SELECT
  AVG(CAST(ROUND(Reputation, -FLOOR(LOG(Reputation, 10))) AS BigInt)) AS UserReputation,
  AVG(CAST(PostsWithDeleted.Score AS Float)) AS AverageQuestionScore
FROM
  PostsWithDeleted
INNER JOIN
  Users ON (Users.Id = PostsWithDeleted.OwnerUserId)
WHERE
  PostTypeId = 1 AND Reputation < 100000
GROUP BY
 ROUND(Reputation, -FLOOR(LOG(Reputation, 10)))
ORDER BY
  UserReputation

Enter Parameters

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