Why is my Archaeologist progress off?

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 DISTINCT(p.Id) AS [Post Link]
  FROM Users AS u
  INNER JOIN PostHistory AS h ON u.Id = h.UserId  
  INNER JOIN Posts AS p ON p.Id = h.PostId
  OUTER APPLY (
    SELECT MAX(CreationDate) AS PreviousEditDate
      FROM PostHistory
      WHERE PostId = h.PostId
        AND PostHistoryTypeId IN (1, 2, 3, 4, 5, 6) -- all edits count
        AND (CreationDate < h.CreationDate
         OR (CreationDate = h.CreationDate AND UserId != h.UserId))
         -- improved suggested edits will have the same timestamp but do not count
  ) AS oa
  WHERE u.AccountId = ##AccountId:int##
    AND h.PostHistoryTypeId IN (4, 5) -- Edit Title, Edit Body
    AND h.CreationDate >= DATEADD(DAY, 180, oa.PreviousEditDate)
    AND p.PostTypeId IN (1, 2)
    -- tag wikis/excerpts do not count
    AND (p.OwnerUserId IS NULL OR p.OwnerUserId != u.Id)
    -- exclude own questions and answers

Enter Parameters

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