Percentage Questions Answered within Two Business Days by Quarter

0

Please login or register to vote for this query.

(click on this box to dismiss)

History of Science and Math

Q&A for people interested in the history and origins of science and mathematics

DECLARE @Tag nvarchar(25) = ##Tag:string##;
DECLARE @MinDate datetime = ##MinDate:string##;
DECLARE @MaxDate datetime = ##MaxDate:string##;

SELECT 
  Questions.Id AS QuestionId,
  Questions.CreationDate AS AskDate,
  Answers.CreationDate AS AnswerDate,
  DATEDIFF(dd, Questions.CreationDate, Answers.CreationDate) AS ResponseDays
FROM 
  Posts AS Questions
  LEFT JOIN Posts Answers ON (Questions.Id = Answers.ParentId)
  INNER JOIN PostTags ON (Questions.Id = PostTags.PostId)
  INNER JOIN Tags ON (PostTags.TagId = Tags.Id)
WHERE 
  Questions.PostTypeId = 1 AND
  Questions.CreationDate >= @MinDate AND
  Questions.CreationDate <= @MaxDate AND
  Tags.TagName = @Tag
/* GROUP BY Questions.Id */

Enter Parameters

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