Longest time between edit suggestion and approval (only tag-info)

1

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(##num##)
s.Id AS [Suggested Edit Link],
concat(
          'site://tags/',
          t.tagname,
          '/info|',
          t.tagname,
          ' ',
          case when p.posttypeid = 4 then 'excerpt' else 'wiki' end
          ) [Tag Link],
s.OwnerUserId AS [User Link],
s.CreationDate, s.ApprovalDate,
DATEDIFF(month, s.CreationDate, s.ApprovalDate) AS Months,
DATEDIFF(day, s.CreationDate, s.ApprovalDate) AS Days,
DATEDIFF(hour, s.CreationDate, s.ApprovalDate) AS Hours,
DATEDIFF(minute, s.CreationDate, s.ApprovalDate) AS Minutes
FROM SuggestedEdits s JOIN posts p ON s.PostId=p.Id
INNER JOIN tags t ON (t.wikipostid = p.id or t.excerptpostid = p.id)          
WHERE (s.ApprovalDate IS NOT NULL) AND (p.PostTypeId IN (3,4,5))
ORDER BY DATEDIFF(minute, s.CreationDate, s.ApprovalDate) DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results