Q&A for enthusiasts and power users of the Android operating system
SELECT q.Id AS QuestionId, q.Title AS QuestionTitle, q.CreationDate AS QuestionCreationDate, a.Id AS AnswerId, a.CreationDate AS AnswerCreationDate, a.Score AS AnswerScore, DATEDIFF(second, q.CreationDate, a.CreationDate) AS TimeDifferenceInDays -- Time difference in days FROM Posts AS q JOIN Posts AS a ON q.Id = a.ParentId WHERE q.PostTypeId = 1 -- 1 indicates questions AND a.PostTypeId = 2 -- 2 indicates answers AND q.OwnerUserId = 61624 -- User ID for Daniel Kaplan AND a.OwnerUserId = 61624 -- User ID for Daniel Kaplan ORDER BY q.CreationDate DESC