Q&A about the site for people who use Blender to create 3D graphics, animations, or games
select min(Votes.CreationDate), (count(*) + 0.0) / DATEPART(day, EOMONTH(MIN(Votes.CreationDate))) as 'votes per day' from Posts -- It would be nicer to only do one inner join of PostTags with -- an "or" in the "on" condition. However, that takes significantly -- longer for some reason. It's strange really: getting this data -- for only questions or only answers is super fast, but combining -- them... a lot slower. left join PostTags qTags on qTags.PostId = Posts.Id left join PostTags aTags on aTags.PostId = Posts.ParentId inner join Votes on Votes.PostId = Posts.Id where (VoteTypeId = 2 OR VoteTypeId = 3) AND (qTags.TagId = 59148 or aTags.TagId = 59148) AND -- that's 'rust' Votes.CreationDate > '2013-01-01' group by DATEPART(month, Votes.CreationDate), DATEPART(year, Votes.CreationDate) order by min(Votes.CreationDate)