Recent first questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

Returns each user's first question, with the most recent posts first.

Physics

Q&A for active researchers, academics and students of physics

WITH MidResults AS (
    SELECT Id, 
           OwnerUserId, 
           CreationDate, 
           Score,
           ClosedDate,
           ROW_NUMBER() OVER(PARTITION BY OwnerUserId 
                                 ORDER BY CreationDate ASC) AS rank
      FROM Posts
      WHERE Posts.PostTypeId = 1 -- questions
      )
SELECT TOP ##number?200##
  Id AS [Post Link],
  OwnerUserId AS [User Link],
  CreationDate,
  Score,
  CASE WHEN ClosedDate IS NOT NULL THEN 'Closed' ELSE NULL END
FROM MidResults
WHERE MidResults.rank = 1
ORDER BY CreationDate DESC

Enter Parameters

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