Average question score by day

0

Please login or register to vote for this query.

(click on this box to dismiss)

What the title says

Pets Meta

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;

Enter Parameters

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