SELECT TOP 100 Id AS [User Link], B.C AS 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

-- Enter Query Title
-- Enter Query Description
SELECT TOP 100
    Id AS [User Link],
    B.C AS Count
FROM Users U
INNER JOIN
    (SELECT
    UserId, C = Count(*)
    FROM Badges
    GROUP BY UserId) B
ON U.id = B.UserId
ORDER BY B.C Desc

Enter Parameters

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