Average time of spam removal (per month)

1

Please login or register to vote for this query.

(click on this box to dismiss)

Computational Science

Q&A for scientists using computers to solve scientific problems

;  with spam_cte as
(SELECT DISTINCT 
  p.Id AS pid,
  DATEDIFF(minute, p.CreationDate, p.DeletionDate) AS Minutes,
  p.CreationDate AS cre,
  p.DeletionDate AS del
FROM PostsWithDeleted p INNER JOIN Votes v ON v.PostId=p.Id
WHERE (v.VoteTypeId=##votetype?12##) 
AND (p.CreationDate >= '##Date1?2020-01-01##') AND (p.CreationDate <= '##Date2?2030-01-01##')
AND (p.DeletionDate IS NOT NULL)
)

SELECT
  eomonth(cre), 
  AVG(Minutes) AS [Average]
FROM spam_cte
GROUP BY eomonth(cre)
ORDER BY eomonth(cre)

Enter Parameters

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