Unclosed questions with only zero-score answers

0

Please login or register to vote for this query.

(click on this box to dismiss)

For a variant of this query that lets you filter results by tags: http://data.stackexchange.com/codereview/query/160341

Christianity Meta

Q&A about the site for committed Christians, experts in Christianity and those interested in learning more

SELECT TOP 100
        Questions.Id AS [Post Link],
        Questions.Score AS Score,
        COUNT(Answers.Id) AS [# Answers],
        'site://a/' + CAST(Questions.AcceptedAnswerId AS nvarchar) + '|' + nchar(0x2713) AS [Accepted Answer]
    FROM Posts AS Questions
        JOIN Posts AS Answers
            ON Answers.ParentId = Questions.Id
    WHERE
        NOT EXISTS (
            SELECT Id
                FROM Posts AS Answers
                WHERE
                    Answers.ParentId = Questions.Id AND
                    Answers.Score <> 0
        )
    GROUP BY Questions.Id, Questions.AcceptedAnswerId, Questions.Score, Questions.ViewCount, Questions.CreationDate
    HAVING COUNT(Answers.Id) > 0
    ORDER BY Questions.Score DESC, COUNT(Questions.AcceptedAnswerId), COUNT(Answers.Id) DESC, Questions.ViewCount DESC, Questions.CreationDate DESC;

Enter Parameters

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