SELECT TOP 20 COUNT(*) AS QuestionIncludingDeletedAndClos...

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

-- By Questions (Including Deleted and Closed)
SELECT TOP 20
  COUNT(*) AS QuestionIncludingDeletedAndClosedCount,
  P.OwnerUserId AS [User Link]
FROM PostsWithDeleted P
--JOIN Users U ON U.Id = P.OwnerUserId
WHERE
  P.PostTypeId = 1 -- Questions
GROUP BY P.OwnerUserId
ORDER BY COUNT(*) DESC
;

Enter Parameters

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