Best recent posts

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

-- days: Last how many days?

SELECT TOP 30
  Score,
  post.Id AS [Post Link],
  CreationDate,
  Tags,
  posttype.Name AS Type
FROM PostsWithDeleted post
JOIN PostTypes posttype ON posttype.Id=PostTypeId
WHERE DATEDIFF(day, CreationDate, GETDATE()) < ##days:int?8##
ORDER BY Score DESC, PostTypeId

Enter Parameters

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