Average time until spam posts were deleted

1

Please login or register to vote for this query.

(click on this box to dismiss)

Martial Arts Meta

Q&A about the site for students and teachers of all martial arts

;  with spam_cte as
(SELECT DISTINCT 
  p.Id AS pid,
  DATEDIFF(minute, p.CreationDate, p.DeletionDate) AS Minutes
FROM PostsWithDeleted p INNER JOIN Votes v ON v.PostId=p.Id
WHERE v.VoteTypeId=##votetype?12## 
AND (p.DeletionDate IS NOT NULL))

SELECT
  AVG(CAST(minutes AS decimal)) AS [Average],
  MAX(minutes) AS [Maximum]
FROM spam_cte

Enter Parameters

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