SELECT TOP 10 u.Id AS [User Link], COUNT(*) FROM Users u ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT TOP 10 u.Id AS [User Link], COUNT(*)
FROM Users u
JOIN Posts p ON p.OwnerUserId = u.Id
JOIN Votes v ON v.PostId = p.Id
WHERE v.VoteTypeId = 6 -- close votes
AND v.CreationDate > DATEADD(month, -1, getutcdate()) -- in the last month
GROUP BY u.Id
ORDER BY COUNT(*) DESC

Enter Parameters

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