First Questions with Answers Posted Within 24 Hours

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 TOP(100) * FROM Posts ORDER BY CreationDate DESC; */

DECLARE @HoursElapsed AS INT;
SET @HoursElapsed = 24;

/*
SELECT @HoursElapsed AS [@HoursElapsed];
*/

SELECT
    q.Id AS [Q Id]
  , q.CreationDate AS [Q Date]
  , a.Id AS [A Id]
  , a.CreationDate AS [A Date]

FROM Posts AS q
INNER JOIN Posts AS a
  ON q.Id = a.ParentId
  AND q.PostTypeId = 1
  AND a.PostTypeId = 2
/*INNER JOIN Users u
  ON q.OwnerUserId = Users.Id */


ORDER BY q.CreationDate DESC;

Enter Parameters

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