Answers to old questions

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

-- this script should find the set of answers of a given user
--  that are to questions where the difference in post dates is
--  greater than 30 days


--DECLARE @user INT = ##UserID:int##

SELECT 
  Answer.Id as [Post Link], Answer.Score as [A. Score], Question.Score as [Q. Score]
FROM Posts as Answer
  LEFT JOIN  Posts as Question on Answer.ParentId = Question.Id
    WHERE
      DATEDIFF(dd, Question.CreationDate, Answer.CreationDate) = 311
      --AND Answer.Score > 20
  ORDER BY Question.CreationDate DESC

Enter Parameters

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