DECLARE @newestquestion DateTime SELECT @newestquestion =...

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

DECLARE @newestquestion DateTime
SELECT @newestquestion = MAX(CreationDate) FROM Posts

-- Just to play around with what a intersting the date range could be
--SELECT COUNT(id) FROM Posts WHERE PostTypeId = 1 AND Score >= 4 AND CreationDate >= @newestquestion-365

SELECT TOP 250 Id AS [Post Link], ViewCount, Score, AnswerCount, CreationDate FROM Posts WHERE PostTypeId = 1 AND CreationDate >= @newestquestion-365 ORDER BY Score DESC;

Enter Parameters

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