Distribution of the number of co-authors per answer (excluding community wiki)
Q&A for pro webmasters
-- Number of authors per answer (non-CW) -- Distribution of the number of co-authors per answer -- (excluding community wiki) WITH TotalAnswers AS ( SELECT Cast(Count(*) AS FLOAT) AS Count FROM Posts WHERE PostTypeId = 2 AND CommunityOwnedDate IS NULL ) SELECT a.Authors AS [Authors], Count(*) AS [Answers], Round(Count(*) / (SELECT Count FROM TotalAnswers) * 100, 1) As [Percent] FROM ( SELECT PostId, Count(DISTINCT UserId) As [Authors] FROM PostHistory WHERE PostHistoryTypeId = 5 OR PostHistoryTypeId = 2 GROUP BY PostId ) AS a INNER JOIN Posts p ON p.Id = a.PostId WHERE p.PostTypeId = 2 AND p.CommunityOwnedDate IS NULL GROUP BY a.Authors ORDER BY Authors