Returns each user's first question, with the most recent posts first.
Q&A for Ubuntu users and developers
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 and CreationDate < DATEADD(month, -6, GETDATE()) ORDER BY CreationDate DESC