Q&A for experienced flyers, pilots, and builders of drones and model aircraft
SELECT CURRENT_TIMESTAMP AS QueryRunTime, q.Id AS QuestionId, q.Title, COUNT(a.Id) AS AnswerCount, ROUND(AVG(COUNT(a.Id)) OVER (), 2) AS AverageAnswersPerQuestion FROM Posts q LEFT JOIN Posts a ON a.ParentId = q.Id AND a.PostTypeId = 2 -- 2 typically represents Answers WHERE q.Id = 39315028 AND q.PostTypeId = 1 -- 1 typically represents Questions GROUP BY q.Id, q.Title;