SELECT COUNT(*) * 2 FROM Votes v INNER JOIN Posts a ON a...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

-- Enter Query Title
-- Enter Query Description

SELECT COUNT(*) * 2 FROM Votes v
    INNER JOIN Posts a ON a.Id = v.PostId
    INNER JOIN Posts q ON q.Id = a.ParentId
    WHERE
        v.VoteTypeId = 1 AND
        q.OwnerUserId != a.OwnerUserId AND
        (q.CommunityOwnedDate IS NULL OR q.CommunityOwnedDate > v.CreationDate)

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached