SELECT COUNT(Posts.ClosedDate) AS [Closed Posts], COUNT(*...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Meta Stack Exchange

Q&A about the Stack Exchange Network

SELECT
   COUNT(Posts.ClosedDate) AS [Closed Posts],
   COUNT(*) AS [Total Posts],
   CONVERT(varchar(10), ROUND(100.0 * (COUNT(Posts.ClosedDate) / CAST(COUNT(*) AS float)), 2)) + '%' AS [Monthly %],
   YEAR(Posts.CreationDate) AS [Year],
   MONTH(Posts.CreationDate) AS [Month]
FROM
  Posts
WHERE
  PostTypeId = 1
GROUP BY
  YEAR(Posts.CreationDate),
  MONTH(Posts.CreationDate)
ORDER BY
  Year DESC, Month DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results