Accepted answers to questions old more than a period


Please login or register to vote for this query.

(click on this box to dismiss)

Android Enthusiasts

Q&A for enthusiasts and power users of the Android operating system

-- Shows accepted answers to questions old more than a period
-- ResultCount: Number of results to display
-- AnsweringThreshold: The question should have been created [x] months ago

SELECT TOP ##ResultCount:int##
       q.Id as [Post Link],
       q.Score as [Question scored],
       u.Id as [User Link],
       q.CreationDate as [Asked on],
       a.Score as [Answer scored],
       a.CreationDate as [Answered on],
       au.Id as [User Link]
       FROM Posts q
       JOIN Posts a ON q.AcceptedAnswerId = a.Id
       JOIN Users u ON q.OwnerUserId = u.Id
       JOIN Users au ON a.OwnerUserId = au.Id
       WHERE q.PostTypeId = 1
             AND DATEDIFF(month, q.CreationDate, a.CreationDate) >= ##AnsweringThreshold:int##
             AND q.AcceptedAnswerId IS NOT NULL
             ORDER BY q.Id DESC

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results