WITH QuestionAndAnswer AS ( SELECT q.Id AS QuestionId, q....

0

Please login or register to vote for this query.

(click on this box to dismiss)

Bicycles

Q&A for people who build and repair bicycles, people who train cycling, or commute on bicycles

WITH QuestionAndAnswer AS (
    SELECT
        q.Id AS QuestionId,
        q.CreationDate AS QuestionCreationDate,
        a.Id AS AnswerId,
        a.CreationDate AS AnswerCreationDate
    FROM Posts q
    JOIN Posts a ON q.Id = a.ParentId
    WHERE q.PostTypeId = 1
    AND a.PostTypeId = 2
)
SELECT * FROM QuestionAndAnswer
WHERE DATEDIFF(second, AnswerCreationDate, QuestionCreationDate) BETWEEN -1 AND 30;

Enter Parameters

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