Count of posts edited by some users

0

Please login or register to vote for this query.

(click on this box to dismiss)

Amateur Radio

Q&A for amateur radio enthusiasts

DECLARE @UserId int = ##UserId?209103##

-- Edits to Questions (includes re-tagging)
SELECT 
  DATEADD(WEEK, DATEDIFF(WEEK, 0, PostHistory.CreationDate), 0) AS [Week]
  , COUNT(*) AS Count
FROM Posts
INNER JOIN PostHistory ON PostHistory.PostId = Posts.Id
WHERE PostHistory.UserId = @UserId
GROUP BY DATEADD(WEEK, DATEDIFF(WEEK, 0, PostHistory.CreationDate), 0)
ORDER BY [Week] DESC

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results