Average answer score by the rep of the OP

1

Please login or register to vote for this query.

(click on this box to dismiss)

Portuguese Language

Q&A for linguists, teachers and learners wanting to discuss the finer points of the Portuguese language

WITH Raw AS (
  SELECT
    FLOOR(
      POWER(##LogBase:float?1.2##,
        FLOOR(
          LOG(0.1 * Users.Reputation) / LOG(##LogBase##)
        )
      )
    ) AS Rep,
    Posts.Score AS Score
  FROM Posts, Users
  WHERE
    Posts.OwnerUserId = Users.Id
    AND
    Posts.PostTypeId = 2
)
SELECT
  10 * Rep,
  AVG(1.0 * Score) AS AvgScore
FROM Raw
WHERE (##MaxRep:int?10000## = 0) OR (Rep <= ##MaxRep##)
GROUP BY Rep
ORDER BY Rep

Enter Parameters

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