SELECT CURRENT_TIMESTAMP AS QueryRunTime, q.Id AS Questio...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Drones and Model Aircraft Meta

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;

Enter Parameters

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