Answers with best score created within 3 month range

2

Please login or register to vote for this query.

(click on this box to dismiss)

Emacs

Q&A for those using, extending or developing Emacs

DECLARE @From DATETIME = convert(DATETIME, '##StartDate?2015-04-01##')
DECLARE @To DATETIME = dateadd(mm, 3, @From)

SELECT TOP ##Count:int?50## A.Id AS [Post Link], 
  A.CreationDate AS Created, U.Id as [User Link], A.Score AS [Answer Score], 
  Q.Score AS [Question Score], Q.ViewCount AS Views
FROM
  Posts A
  INNER JOIN Posts Q ON A.ParentId = Q.Id
  INNER JOIN Users U on A.OwnerUserId = U.Id
WHERE
  A.PostTypeId = 2 AND
  A.CreationDate BETWEEN @From AND @To
ORDER BY A.Score DESC

Enter Parameters

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