Physical deletion of posts from the site

1

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Ubuntu

Q&A for Ubuntu users and developers

WITH Raw AS (
  SELECT
    Id,
    Id/##Quantum:int?1000## AS Qn,
    RANK() OVER (PARTITION BY Id/##Quantum## ORDER BY CreationDate) AS DateRank,
    CreationDate
  FROM PostsWithDeleted
),
Q AS (
  SELECT Qn, COUNT(*) AS Count
  FROM Raw
  GROUP BY Qn
),
D AS (
  SELECT Qn, CreationDate
  FROM Raw
  WHERE DateRank = ##Quantum##/2
)
SELECT
  D.CreationDate AS MedianDate,
  100.0 - 100.0 * Q.Count / ##Quantum## AS PctDeleted
FROM Q, D
WHERE Q.Qn = D.Qn
ORDER BY D.CreationDate

Enter Parameters

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