Have the top users' first posts been questions or answers?

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

WITH FirstPosts AS (
    SELECT OwnerUserId as SEUser,
           Min(Id) as Post
    FROM Posts
    WHERE PostTypeId = 1 or PostTypeId = 2
    GROUP BY OwnerUserId
) 

SELECT TOP 500
       FirstPosts.SEUser as [User Link],
       FirstPosts.Post as [Post Link],
       [Post type] = case PostTypeID when 1 then 'Question'
                                     when 2 then 'Answer'
                                     else '???'
                                     end,
       Reputation
FROM FirstPosts JOIN Users on FirstPosts.SEUser = Users.Id
                JOIN Posts on FirstPosts.Post = Posts.Id
ORDER BY Reputation desc

Enter Parameters

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