[FAQ] tagged questions' Community Wiki status and timing

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

SELECT      
            q.id                                                    AS [Post Link]
            , q.CreationDate                                        AS [Q Asked Dt]
            , q.CommunityOwnedDate                                  AS [Comm Owned Dt]
            , DATEDIFF (DAY, q.CreationDate, q.CommunityOwnedDate)  AS [Days Crtd before CW]
            , ph.CreationDate                                       AS [FAQ tag added]
            , DATEDIFF (DAY, ph.CreationDate, q.CommunityOwnedDate) AS [Days tggd before CW]
            , q.Tags
FROM        Posts                   q
INNER JOIN  PostTags                pt  ON  q.Id = pt.PostId
INNER JOIN  Tags                    t   ON  t.Id = pt.TagId
CROSS APPLY (
    SELECT      TOP 1
                ph.CreationDate
    FROM        PostHistory ph
    WHERE       q.Id = ph.PostId
    AND         ph.PostHistoryTypeId    IN (3, 6)  -- Initial tags or tag edit
    AND         ph.Text                 LIKE '%<faq>%'
    ORDER BY    ph.CreationDate
) AS ph
WHERE       q.PostTypeId            = 1
AND         t.TagName               = 'faq'
ORDER BY    q.CreationDate

Enter Parameters

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