Answer deletion probability by its post order

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

WITH Raw AS (
  SELECT
    Q.Id AS QId,
    RANK() OVER (PARTITION BY Q.Id ORDER BY A.Id) AS No,
    A.DeletionDate
  FROM Posts Q, PostsWithDeleted A
  WHERE A.ParentId = Q.Id
)
SELECT
  No,
  100.0 * COUNT(DeletionDate) / COUNT(*) AS PDel
FROM Raw
WHERE No < ##MaxAnswerCount:int?10##
GROUP BY No
ORDER BY No

Enter Parameters

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