Percentage of first posts which get closed (per month) - between two dates


Please login or register to vote for this query.

(click on this box to dismiss)

Poker Meta

Q&A about the site for serious players and enthusiasts of poker

;with firstpostids_cte as (
SELECT MIN(Id) AS MinId, OwnerUserId
FROM Posts
WHERE PostTypeId=1
GROUP BY OwnerUserId
, firstpostsclosed_cte as (
p.Id, p.CreationDate AS cre, p.ClosedDate AS clo
FROM firstpostids_cte fp JOIN Posts p ON fp.MinId=p.Id

----COUNT(clo), COUNT(*),
ROUND((COUNT(clo))*100.0/(COUNT(*)),2) AS percentage
FROM firstpostsclosed_cte
WHERE cre >= '##Date1?2014-10-01##' AND cre <= '##Date2?2015-11-30##'
GROUP BY eomonth(cre)
ORDER BY eomonth(cre)

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results