Stats For Rep Per Post

0

Please login or register to vote for this query.

(click on this box to dismiss)

Meta Stack Overflow

Q&A about Stack Overflow, Server Fault and Super User

With repPerPostUser as
(
  SELECT 
      u.id,
      CAST (u.Reputation as decimal(15,5)) / 
        CAST (CASE 
                WHEN COUNT(p.id) = 0 THEN 1 
                ELSE COUNT(p.id) 
                END AS decimal(15,5)) RepPerPost
              
          

  FROM
    users u
    INNER JOIN posts p
    ON u.id = p.OwnerUserId
  GROUP BY
    u.id, u.reputation
)
SELECT
  AVG(RepPerPost) Mean_RepPerPost,
  MAX(RepPerPost) Max_RepPerPost,
  MIN(RepPerPost) Min_RepPerPost,
  STDEV(RepPerPost) Std_Dev_RepPerPost
FROM
  repPerPostUser

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached