SELECT top 100 Id AS [User Link], (SELECT COUNT(*) FROM P...

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

-- Enter Query Title
-- Enter Query Description
SELECT top 100
Id AS [User Link],
(SELECT COUNT(*)
FROM Posts
WHERE Posts.OwnerUserId = Users.Id
AND PostTypeId = 2
) AS [Total Posts],
(SELECT COUNT(Score)
FROM Posts
WHERE Posts.OwnerUserId = Users.Id
AND PostTypeId = 2
) AS [Total Score]
FROM Users
ORDER BY [Total Posts] DESC

Enter Parameters

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