Q&A for followers of the Hindu religion and those interested in learning more about Hinduism
DECLARE @AskTime DATETIME = convert(DATETIME, '##AskTime?2020/01/01 00:00:00##') DECLARE @StartTime DATETIME = convert(DATETIME, '##StartTime?2020/04/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