Average upvotes based on whether question title contains a question mark

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT CAST(CHARINDEX('?', Title)  AS BIT) AS HasQuestionMark, AVG(CAST(Score AS FLOAT)) AS AverageScore
FROM Posts
WHERE PostTypeId = 1
AND Score < 50
GROUP BY CAST(CHARINDEX('?', Title)  AS BIT)

Enter Parameters

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