Last post by deleted users - count by month

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mathematics

Q&A for people studying math at any level and professionals in related fields

---Last post by deleted users
---divided by month
;  with last_cte as
(
SELECT
    OwnerDisplayName,
    MAX(Id) AS MaxId
FROM Posts
WHERE OwnerUserId IS Null
GROUP BY OwnerDisplayName
), dates_cte as
(
SELECT
  p.OwnerDisplayName AS odn, p.Id AS pid, p.CreationDate AS CDate
  FROM Posts p INNER JOIN last_cte ON p.Id=maxid
)

SELECT eomonth(CDate),
  COUNT(odn)
FROM dates_cte
GROUP BY eomonth(CDate)
ORDER BY eomonth(CDate)

Enter Parameters

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