test

0

Please login or register to vote for this query.

(click on this box to dismiss)

Gardening and Landscaping Meta

Q&A about the site for gardeners and landscapers

DECLARE @UserId int = 447970


DECLARE @EditTitle    int = 4
DECLARE @EditBody     int = 5
DECLARE @PostDelete   int = 12
DECLARE @PostUndelete int = 13

DECLARE @EditCount int

SELECT @EditCount = COUNT(DISTINCT h.RevisionGUID)
    FROM PostHistory h
    WHERE h.UserId = @UserId
      and h.CreationDate > '2018-03-31'
      AND h.PostHistoryTypeId IN (@EditTitle, @EditBody)
      AND h.PostId NOT IN (SELECT p.Id
                               FROM Posts p
                               WHERE p.OwnerUserId = h.UserId)



SELECT @UserId      AS [User Link],
       @EditCount   AS "Edit count"

Enter Parameters

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