Users with most posts between two dates

1

Please login or register to vote for this query.

(click on this box to dismiss)

Sports

Q&A for participants in team and individual sport activities

;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 meta site
loading Hold tight while we fetch your results