select datediff(month,0,q.CreationDate) , count(*) , 100...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Enter Query Title

Stack Overflow Meta en español

Preguntas y respuestas sobre el sitio para programadores y profesionales de la informática

-- Enter Query Title
-- Enter Query Description
-- Enter Query Title
-- Enter Query Description

select datediff(month,0,q.CreationDate)
, count(*)
, 100.0 * count(*) / (select count(*) from posts where posttypeid = 2 and CreationDate between '2011-01-01' and '2011-02-01')
from posts a
join posts q
on a.parentid = q.id
where a.posttypeid = 2
and q.posttypeid = 1
and a.CreationDate between '2011-01-01' and '2011-02-01'
group by datediff(month,0,q.CreationDate)
order by datediff(month,0,q.CreationDate) desc

Enter Parameters

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