Longest time between creation and closure

1

Please login or register to vote for this query.

(click on this box to dismiss)

Mathematics

Q&A for people studying math at any level and professionals in related fields

SELECT TOP(##num?100##)
  p.Id AS [Post Link],
  'site://posts/' + CAST(p.Id AS varchar)+'/revisions' AS [Revision History],
  'site://posts/' + CAST(p.Id AS varchar)+'/timeline' AS [Timeline],
  DATEDIFF(year, p.CreationDate, p.ClosedDate) AS Years,
  DATEDIFF(month, p.CreationDate, p.ClosedDate) AS Months,
  DATEDIFF(day, p.CreationDate, p.ClosedDate) AS Days,
  DATEDIFF(hour, p.CreationDate, p.ClosedDate) AS Hours,
  DATEDIFF(minute, p.CreationDate, p.ClosedDate) AS Minutes
FROM PostsWithDeleted p
WHERE p.ClosedDate IS NOT NULL
ORDER BY DATEDIFF(minute, p.CreationDate, p.ClosedDate) DESC

Enter Parameters

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