total_answers_by_year

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

select 
CONVERT(DATE, CreationDate) as datetime, 
'Question' as type,
count(*) as count
from posts 
where posttypeid = 1
group by 
CONVERT(DATE, creationDate)
UNION ALL
select 
CONVERT(DATE, CreationDate) as datetime, 
'Answer' as type,
count(*) as count
from posts 
where posttypeid = 2
group by 
CONVERT(DATE, creationDate)

Enter Parameters

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