select dateadd(week, datediff(week, 0, a.CreationDate), 0...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Moderators

Q&A for community managers, administrators, and moderators

select dateadd(week, datediff(week, 0, a.CreationDate), 0) wk, count(v.PostId)*1.0/count(distinct a.Id) UpvotesPerAnswerWithinFirstWeek
from PostsWithDeleted a
left join Votes v on v.PostId=a.Id and VoteTypeId=2 and v.CreationDate < a.CreationDate+7
where PostTypeId=2
and a.CreationDate > getdate()-730
group by dateadd(week, datediff(week, 0, a.CreationDate), 0)
order by dateadd(week, datediff(week, 0, a.CreationDate), 0)

Enter Parameters

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