SELECT cast(year(creationdate) as varchar(4)) + '-' + cas...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Moderators

Q&A for community managers, administrators, and moderators

SELECT
cast(year(creationdate) as varchar(4)) + '-' + cast(month(creationdate) as varchar(2)),
    COUNT(Id) AS [Total Questions],
    COUNT(ClosedDate) AS [Closed Questions],
    COUNT(ClosedDate) * 100 / COUNT(Id) AS [Percentage Closed]
FROM Posts
WHERE PostTypeID = 1
group by year(creationdate), month(creationdate)
order by year(creationdate), month(creationdate)

Enter Parameters

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