select u.Id, avg(datediff(minute, p1.CreationDate, p2.Cre...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Christianity Meta

Q&A about the site for committed Christians, experts in Christianity and those interested in learning more

select u.Id, 
avg(datediff(minute, p1.CreationDate, p2.CreationDate)) , count (*) K 
from Posts p1, Posts p2 , Users u
where p1.PostTypeId = 1 and p2.PostTypeId = 2 and p2.ParentId = p1.Id 
and p1.AcceptedAnswerId = p2.Id and p2.OwnerUserId = u.Id
group by u.Id  
order by avg(datediff(minute, p1.CreationDate, p2.CreationDate))

Enter Parameters

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