SELECT FORMAT(p.CreationDate, 'yy-MM') as [Month], SUM(CA...

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 
    FORMAT(p.CreationDate, 'yy-MM') as [Month],
    SUM(CASE WHEN t.TagName = 'shell' THEN 1 ELSE 0 END) as ShellQuestions,
    SUM(CASE WHEN t.TagName = 'c' THEN 1 ELSE 0 END) as CQuestions,
    SUM(CASE WHEN t.TagName = 'html' THEN 1 ELSE 0 END) as HTMLQuestions,
    SUM(CASE WHEN t.TagName = 'objective-c' THEN 1 ELSE 0 END) as ObjectiveCQuestions
FROM Posts p
INNER JOIN PostTags pt ON pt.PostId = p.Id
INNER JOIN Tags t ON t.Id = pt.TagId
WHERE 
    p.PostTypeId = 1  -- 1=Question
    AND t.TagName IN ('shell', 'c', 'html', 'objective-c')
GROUP BY 
    FORMAT(p.CreationDate, 'yy-MM')
ORDER BY 
    [Month];

Enter Parameters

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