Old unanswered questions

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @AskTime DATETIME = convert(DATETIME, '##AskTime?2019/04/01 00:00:00##')
DECLARE @StartTime DATETIME = convert(DATETIME, '##StartTime?2019/07/01 00:00:00##')

SELECT Q.Id AS [Post Link], Q.ViewCount AS Views, 
  Q.Score, Q.AnswerCount AS Answers
FROM
  Posts Q
WHERE
  Q.PostTypeId = 1 AND
  Q.ClosedDate IS NULL AND
  Q.CreationDate < @AskTime AND
  NOT EXISTS (SELECT * FROM Posts A WHERE
    A.ParentId = Q.Id AND A.CreationDate < @StartTime)
ORDER BY Q.ViewCount DESC

Enter Parameters

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