I am trying to query SEDE so I can count the upvotes (and I would also like to count the downvotes in its own column) that happen within 90 days after the question or answer was created.
I have tried this but it always gives me a timeout if I add the AND Dateadd:
select top 10
p.Id,
p.OwnerUserId,
p.CreationDate,
p.PostTypeId,
p.Score,
p.CommentCount,
p.Body,
v.postid AS [Post Link],
count(v.postid) as 'UpVote count'
from votes v
inner join posts p on p.id=v.postid
where (((PostTypeId = 1) OR (PostTypeId = 2)) and VoteTypeId in (2))
AND (v.CreationDate = DATEADD(day, 90, CONVERT(DATE, p.CreationDate)))
group by v.postid, p.body, p.Id, p.OwnerUserId, p.CreationDate,
p.PostTypeId, p.Score, p.CommentCount, p.Body