select datepart(year, a.CreationDate), count(*) from post...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Open Source Meta

Q&A about the site for people organizing, marketing or licensing open source development projects

select
  datepart(year, a.CreationDate),
  count(*)
from
  posts as a
  left join posts as q on q.Id = a.ParentId
where
  (1 = 1)
  and a.PostTypeId = 2
  and q.PostTypeId = 1
  and q.ClosedDate < a.CreationDate
group by
  datepart(year, a.CreationDate)
order by
  datepart(year, a.CreationDate) asc

Enter Parameters

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