Posts with the longest initial revision

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
  p.Id AS [Post Link],
  Len(ph.Text) AS [Initial Length],
  Len(p.Body) AS [Current Length],
  IIF(p.PostTypeId = 1, Cast(p.AnswerCount AS VarChar(8)), '-') AS [Answers],
  p.Score AS [Score],
  p.CommentCount AS [Comments],
  p.ViewCount AS [Views],
  p.OwnerUserId AS [User Link],
  p.CreationDate AS [Date]
FROM Posts p
INNER JOIN PostHistory ph
ON ph.PostId = p.Id
WHERE ph.PostHistoryTypeId = 2 -- Initial Body
  AND (PostTypeId = 1 OR PostTypeId = 2)
ORDER BY Len(ph.Text) DESC

Enter Parameters

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