Topics with activity date earlier than their answers' most recent ativity date

0

Please login or register to vote for this query.

(click on this box to dismiss)

This query returns all topics whose activity date is affected by the bug described in the following MSO topic: http://meta.stackoverflow.com/q/121413

Stack Overflow

Q&A for programmers

SELECT P.Id TopicId, P.Id AS [Post Link], 
P.LastActivityDate [Topic Active Date], A.LAD [Most Recent Answer Active Date]
FROM Posts P
JOIN (
  SELECT ParentId, MAX(LastActivityDate) AS LAD 
  FROM Posts 
  GROUP BY ParentId
) A
ON A.ParentId = P.Id
WHERE P.PostTypeId = 1
AND A.LAD > DATEADD(second, 1, P.LastActivityDate)
ORDER BY A.LAD DESC

Enter Parameters

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