Last post by deleted users - count by month (only users with at least 10 posts)

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,
    Count(Id) AS num
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 l ON p.Id=maxid
  WHERE l.num>##min?10##
)

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