Stats on revisions counts per person

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT 
  avg(AnswerRevisionCount) avg_AnswerRevisionCount,
  Max(AnswerRevisionCount) max_AnswerRevisionCount,
  stdev(AnswerRevisionCount) stdev_AnswerRevisionCount
FROM 
  (SELECT 
      q.OwneruserID,
      Cast(count(*) as decimal (15,5)) AnswerRevisionCount
  FROM
      posts q 
      INNER JOIN Posts a
      ON q.id = a.ParentID
      LEFT JOIN PostHistory ph
      ON a.id = ph.PostId
      and ph.PostHistoryTypeId = 5 -- Edit Body
  WHERE q.OwneruserID is not null 
  GROUP BY
     q.OwneruserID
     ) t

Enter Parameters

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