select TagName, count(*) Questions, avg(cast(SecondsToAns...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Computational Science Meta

Q&A for scientists using computers to solve scientific problems

select
  -- Asked,
  TagName,
count(*) Questions,
  avg(cast(SecondsToAnswer as float))/60.0/60.0 AvgHoursToAnswer,
  stdev(cast(SecondsToAnswer as float))/60.0/60.0 StdevHoursToAnswer
from
(
  select 
    t.TagName,
    dateadd(d, - datepart(d, q.CreationDate) + 1, Convert(Date, q.CreationDate)) Asked, 
    min(a.CreationDate) AnswerDate,
    datediff(second, q.CreationDate, min(a.CreationDate)) SecondsToAnswer
  from Posts q
    inner join PostTags pt on q.Id = pt.PostId
    inner join Tags t on pt.TagId = t.Id
    inner join Posts a on q.Id = a.ParentId
  where
    q.CreationDate between   '2013-01-01' and '2017-12-31'
    and q.PostTypeId = 1
    and a.PostTypeId = 2
    and a.Score >= 1
    and datediff(second, q.CreationDate, a.CreationDate) < 2592000 -- 30 days
  group by
    t.TagName,
    q.CreationDate
) q
where
 TagName in ('c#','java','c++','collision-detection','camera','performance',
 'textures','client-server','physics','geometry','mathematics','animation')
group by
  -- Asked,
  TagName
-- order by 
  -- Asked

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results