trial

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS

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

/*
SELECT Month(CreationDate),var(AnswerCount)
FROM Posts 
WHERE PostTypeId = 1 and CreationDate between '2019-01-01'and '2019-12-31'
group by Month(CreationDate)
'user_ques_num','user_ans_num',
'accept_rate','bounty',
*/

select q.Id as Id, min(Datediff(s,q.CreationDate,a.CreationDate)) as ans_time,
avg(a.Score)as ans_score
from Posts q left outer join Posts a on q.Id=a.ParentId
where q.PostTypeId=1 and a.PostTypeId=2 and q.Id=54645858
group by q.Id

Enter Parameters

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