How many posts were possibly made Community-Wiki by suggested edits?

0

Please login or register to vote for this query.

(click on this box to dismiss)

Artificial Intelligence

Q&A for people interested in conceptual questions about life and challenges in a world where "cognitive" functions can be mimicked in purely digital environment

-- How many posts were possibly made Community-Wiki by suggested edits?

SELECT TOP 100  p.Id            AS [Post Link]
              , p.CommunityOwnedDate
              , COUNT (se.Id)   AS [Suggested edits]
              , COUNT (ph.Id)   AS [Edit count]
FROM            Posts           p
INNER JOIN      SuggestedEdits  se
ON              se.PostId       = p.id
INNER JOIN      PostHistory     ph
ON              ph.PostId       = p.id
WHERE           p.CommunityOwnedDate    IS NOT NULL
AND             se.CreationDate <= p.CommunityOwnedDate
AND             ph.PostHistoryTypeId IN (4, 5, 6, 24)  -- "Edit" edits.
AND             p.PostTypeId    < 3 -- Q's and A's only.
AND             EXISTS (
                    SELECT  ph2.Id
                    FROM    PostHistory ph2
                    WHERE   ph2.UserId              = -1 -- User "Community ♦"
                    AND     ph2.PostHistoryTypeId   = 16 -- Community wiki
                    AND     ph2.PostId              = p.id
                )
GROUP BY        p.Id
              , p.CommunityOwnedDate

Enter Parameters

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