Count of posts edited by some users

0

Please login or register to vote for this query.

(click on this box to dismiss)

Android Enthusiasts Meta

Q&A about the site for enthusiasts and power users of the Android operating system

-- Edits to Questions (includes re-tagging)
SELECT Month, [209103] as [puf], [4625829], [5637321], [5996134] as [kendi], [807126] as [doug], [2207583] as [tburner]
FROM (
  SELECT 
    DATEADD(MONTH, DATEDIFF(MONTH, 0, PostHistory.CreationDate), 0) AS [Month]
    , PostHistory.UserId
    , COUNT(*) AS Count
  FROM Posts
  INNER JOIN PostHistory ON PostHistory.PostId = Posts.Id
  WHERE PostHistory.UserId IN (209103, 4625829, 5637321, 5996134, 807126, 2207583)
    AND PostHistory.CreationDate > '2016-01-01'
  GROUP BY DATEADD(MONTH, DATEDIFF(MONTH, 0, PostHistory.CreationDate), 0), PostHistory.UserId
) src
PIVOT (
  MAX(Count)
  FOR UserId IN ([209103], [4625829], [5637321], [5996134], [807126], [2207583])
) piv
ORDER BY [Month] DESC

Enter Parameters

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