After-Closure Answers Posted By [User]


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow Meta en español

Preguntas y respuestas sobre el sitio para programadores y profesionales de la informática

  CONCAT('site://a/', a.Id, '|', q.Title) AS [Link],
  a.CreationDate AS [Answer Posted .],
  q.ClosedDate AS [Q Closed .],
    DATEDIFF(hour, q.ClosedDate, a.CreationDate), 'h ',
    DATEDIFF(minute, q.ClosedDate, a.CreationDate) % 60, 'm ',
    DATEDIFF(second, q.ClosedDate, a.CreationDate) % 60, 's')
  AS [Time After Close],
  CASE WHEN a.OwnerUserId IS NOT NULL THEN u.DisplayName ELSE a.OwnerDisplayName END AS [Answer OP]
FROM Posts a
JOIN Posts q ON q.Id = a.ParentId
LEFT JOIN Users u ON u.Id = a.OwnerUserId
WHERE a.CreationDate > q.ClosedDate 
  AND DATEDIFF(hour, q.ClosedDate, a.CreationDate) < 4
  AND a.OwnerUserId = ##UserId:int##
ORDER BY -- Order By Hours, then Minutes, then Seconds after closure
  DATEDIFF(hour, q.ClosedDate, a.CreationDate) DESC,
  DATEDIFF(minute, q.ClosedDate, a.CreationDate) % 60 DESC,
  DATEDIFF(second, q.ClosedDate, a.CreationDate) % 60 DESC

Enter Parameters

Switch to main site
loading Hold tight while we fetch your results