Users with most posts between two dates

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

;with users_cte as
(SELECT 
  OwnerUserId AS uid, COUNT(Id) AS CountPosts
FROM Posts
WHERE (CreationDate >= '##Date1##')
  AND (CreationDate <= '##Date2##')
GROUP BY OwnerUserId
)

SELECT TOP(##num##)
  uid AS [User Link], CountPosts,
  url = 'site://users/' + CAST(uid AS varchar) + '?tab=activity'  
FROM users_cte
ORDER BY CountPosts DESC

Enter Parameters

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