User Answers over time

0

Please login or register to vote for this query.

(click on this box to dismiss)

Programming Language Design and Implementation Meta

Q&A for designers and implementers of computer programming languages

-- maxRows: How many rows to return:
-- maxPosts: Maximum number of posts a user can have:

SELECT TOP ##maxRows:INT?100##
            'site://u/' + CAST(u.Id AS NVARCHAR) + '|' + u.DisplayName  AS [User]
            , u.Reputation
            , COUNT (p.Id)  AS [Post Count]
FROM        Users u
LEFT JOIN   Posts p         ON (p.OwnerUserId = u.Id  AND  p.PostTypeId IN (1, 2) )  -- Q & A only
GROUP BY    u.Id
            , u.DisplayName
            , u.Reputation
HAVING      COUNT (p.Id) <= ##maxPosts:INT?10##
ORDER BY    u.Reputation DESC
            , [Post Count]
            , u.DisplayName

Enter Parameters

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