What the title says
Q&A about the site for pet owners, caretakers, breeders, veterinarians, and trainers
DECLARE @tag VARCHAR(20); SET @tag = 'javascript'; DECLARE @starttime DATETIME; SET @starttime = '2017-01-01 00:00:00'; DECLARE @endtime DATETIME; SET @endtime = '2017-12-01 00:00:00'; -- not including december because it's still happening SELECT CAST(SUM(Score) AS FLOAT)/COUNT(Score) FROM Posts WHERE CreationDate > @starttime AND CreationDate < @endtime AND CHARINDEX(@tag, Tags) > 0;