SELECT TOP 100 q.Id as [Post Link], q.Score, DATEDIFF(DAY...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT TOP 100 q.Id as [Post Link], q.Score, DATEDIFF(DAY, q.CreationDate, GETDATE()) AS Age, q.Score/(SQRT(DATEDIFF(DAY, q.CreationDate, GETDATE())+1)) AS Immediacy FROM Posts q
LEFT OUTER JOIN Posts a on q.Id=a.ParentId
WHERE q.PostTypeId=1 AND a.Id IS NULL  -- Unanswered question
AND NOT q.Id IN (SELECT ph.PostId FROM PostHistory ph WHERE ph.PostHistoryTypeId=37) -- Not merged
ORDER BY q.Score/(SQRT(DATEDIFF(DAY, q.CreationDate, GETDATE())+1)) DESC

Enter Parameters

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