Top Questions by mean Views/Sec since creation

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 @DbNow DATETIME;

SELECT @DbNow = MAX(CreationDate) FROM PostsWithDeleted;

SELECT TOP 1000
  Id,
  Id AS [Post Link],
  CreationDate,
  ViewCount,
  1.0 * ViewCount / DATEDIFF(s, CreationDate, @DbNow) AS ViewPerSec
FROM PostsWithDeleted
WHERE
  PostTypeId = 1
  AND
  CreationDate < @DbNow
ORDER BY ViewPerSec DESC

Enter Parameters

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