Best Scoring Post Lengths

0

Please login or register to vote for this query.

(click on this box to dismiss)

Score per post, grouped by post length (in increments of 500) Enter 1 for Questions, 2 for Answers, 1,2 for both

Stack Overflow

Q&A for professional and enthusiast programmers

-- Best Scoring Post Lengths
-- Score per post, grouped by post length (in increments of 500)

SELECT
  FLOOR(LEN(Body)/500) * 500 AS [Post Length],
  SUM(Score) AS [Total Score],
  COUNT(Id) AS [Num of Posts],
  CAST(SUM(Score) AS FLOAT) / COUNT(Id) AS [Score Per Post]
FROM
  Posts
WHERE
  PostTypeId IN (##PostTypes##)
GROUP BY
  FLOOR(LEN(Body)/500) * 500
ORDER BY [Post Length] DESC

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results