SELECT p1.Id AS QuestionId, p1.Title AS QuestionTitle, CO...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Meta Stack Exchange

Q&A for meta-discussion of the Stack Exchange family of Q&A websites

SELECT
    p1.Id AS QuestionId,
    p1.Title AS QuestionTitle,
    COUNT(p2.Id) AS NumberOfAnswers,
    AVG(p2.Score) AS AverageAnswerScore
FROM
    Posts p1
JOIN
    Posts p2 ON p1.Id = p2.ParentId
WHERE
    p1.PostTypeId = 1  -- PostTypeId = 1 indicates that the post is a question
    AND p2.PostTypeId = 2  -- PostTypeId = 2 indicates that the post is an answer
GROUP BY
    p1.Id, p1.Title
HAVING
    COUNT(p2.Id) >= 5

Enter Parameters

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