DECLARE @userid int = 1465 SELECT count(UserID), UserID ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Anime and Manga

Q&A for anime and manga fans

-- Enter Query Title
-- Enter Query Description
DECLARE @userid int = 1465

SELECT count(UserID), UserID
FROM PostHistory ph
WHERE PostHistoryTypeId IN (4,5)
    AND PostId NOT IN (
        SELECT p.Id
        FROM Posts p
        WHERE p.OwnerUserId = ph.UserId
    )
    AND UserID = @userid
GROUP BY UserID

Enter Parameters

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