Answer Revision Count by questioner

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 top 100
   OwneruserID,
   OwneruserID [User Link],
   AnswerRevisionCount,
   questionCount,
   rank() over (order by AnswerRevisionCount desc) rank
FROM 
(
SELECT 
      q.OwneruserID ,
      Cast(count(*) as decimal (15,5)) AnswerRevisionCount,
      count(DISTINCT q.id) questionCount
  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
Order by      
     AnswerRevisionCount desc

Enter Parameters

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