Count of users having a well-received post in that month

1

Please login or register to vote for this query.

(click on this box to dismiss)

"well-received": not closed, not deleted and positive score. Counts only the estimated state of the post 30 days after creation.

Monero Meta

Q&A about the site for developers and users of the secure, private and untraceable cryptocurrency Monero

WITH Raw AS (
  SELECT
    DATEFROMPARTS(
      DATEPART(yyyy, CreationDate),
      DATEPART(mm, CreationDate),
      1) AS Month,
    OwnerUserId
  FROM Posts
  WHERE
    PostTypeId BETWEEN 1 AND 2
    AND
    ClosedDate IS NULL
    AND
    OwnerUserId > 0
    AND
    Score > 0
  GROUP BY DATEFROMPARTS(
    DATEPART(yyyy, CreationDate),
    DATEPART(mm, CreationDate),
    1), OwnerUserId
)
SELECT Month, COUNT(*) AS Count
FROM Raw
GROUP BY Month
ORDER BY Month DESC

Enter Parameters

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