Who Brings in the Crowds?

0

Please login or register to vote for this query.

(click on this box to dismiss)

Users sorted by total number of views of their questions per day (with a slight softener to keep very new posts from skewing the results).

Stack Overflow

Q&A for professional and enthusiast programmers

-- Who Brings in the Crowds?
-- Users sorted by total number of views of their questions per day (with a slight softener to keep very new posts from skewing the results).

-- updated to use last database access (by a logged in user -- best we've got) instead of current_timestamp
SELECT TOP 50
  q.OwnerUserId as [User Link],
  count(q.Id) as Questions,
  sum(q.ViewCount/(365+datediff(day, q.CreationDate, datadumptime ))) AS [Question Views per Day]
FROM posts AS q, (select max(LastAccessDate) as datadumptime from Users) tmp
WHERE  
  q.CommunityOwnedDate is null AND
  q.OwnerUserId is NOT null AND
  q.PostTypeId=1
GROUP BY q.OwnerUserId
ORDER BY [Question Views per Day] DESC

Enter Parameters

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