Least visited questions of the site

1

Please login or register to vote for this query.

(click on this box to dismiss)

Drupal Answers Meta

Q&A about the site for Drupal developers and administrators

DECLARE @now DATETIME = (
  SELECT TOP 1 DATEADD(S, 1, CreationDate) FROM Posts ORDER BY Id DESC
);

SELECT TOP ##TopN:int?100##
  Id AS [Post Link],
  CreationDate,
  86400.0 * ViewCount / DATEDIFF(S, CreationDate, @now) AS ViewsPerDay
FROM Posts
WHERE PostTypeId = 1
ORDER BY ViewsPerDay, Id DESC

Enter Parameters

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