get answer count

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mythology Meta

Q&A about the site for enthusiasts and scholars of mythology and folklore

SELECT
    P.Id AS [Post Link],
    P.Title,
    P.Tags,
    P.ViewCount,
    P.AnswerCount, -- the number of undeleted answers (only present if PostTypeId = 1)
    P.Score
FROM Posts AS P
INNER JOIN PostTags AS PT_android ON P.Id = PT_android.PostId
INNER JOIN Tags AS T_android ON PT_android.TagId = T_android.Id
INNER JOIN PostTags AS PT_security ON P.Id = PT_security.PostId
INNER JOIN Tags AS T_security ON PT_security.TagId = T_security.Id
WHERE 
    T_android.TagName = 'android'
    AND T_security.TagName = 'security'
    AND P.PostTypeId = 1 -- 仅选择问题
    AND P.AcceptedAnswerId IS NOT NULL --AcceptedAnswerId不为空
ORDER BY P.ViewCount DESC;

Enter Parameters

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