Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles
DATEADD(YEAR, DATEDIFF(YEAR, 0, CreationDate), 0) AS AI,
COUNT(DISTINCT Posts.Id) AS Count,
SUM(CASE WHEN Posts.AnswerCount > 0 THEN 1 ELSE 0 END) AS answered
WHERE PostTypeId = 1 AND CreationDate > '2012-01-01'
GROUP BY DATEADD(YEAR, DATEDIFF(YEAR, 0, CreationDate), 0)
AI as 'Year',
Count as 'Total Questions',
answered*100 / Count as '% Answered'
Order by Year DESC