SELECT u.Id, COUNT(*) AS numBadges FROM (Users u INNER JO...

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 u.Id, COUNT(*) AS numBadges
FROM (Users u INNER JOIN Badges b ON u.Id = b.UserId)
GROUP BY u.Id
ORDER BY numBadges

Enter Parameters

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