Number of posts for suspended users

1

Please login or register to vote for this query.

(click on this box to dismiss)

Reverse Engineering Meta

Q&A about the site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation

DECLARE @minBadges int = '##MinBadges?10##'
;With CTE AS
(
  SELECT UserId,COUNT(*) AS TotalBadges
  FROM Badges
  GROUP BY UserId
)

SELECT Users.ID AS [User Link], Displayname, Reputation, TotalBadges,
  Count(Posts.Id) AS [Count]
FROM Users JOIN CTE ON Users.ID = CTE.UserId
  INNER JOIN Posts  ON Users.Id=Posts.OwnerUserId
WHERE Users.Reputation = 1 AND TotalBadges >= @minBadges
GROUP BY Users.Id,DisplayName,Reputation,TotalBadges
ORDER BY Count(Posts.Id) DESC, Users.ID

Enter Parameters

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