Just trying out my T-SQL foo.
Wrote a script to get the average time (in seconds) to first answer for a specified language.
-- Could not get this so that the user entered
-- the language in a box at the bottom working.
-- so you have to edit the code here.
declare @Language nvarchar(20) = 'php' -- ##LanguageTag##
declare @AnswerTime table (Id int, CreationDate date, AnswerTime date, Elapse bigint, Slot int )
insert @AnswerTime
Select Q.Id,
max(Q.CreationDate) AS CreateTime,
min(A.CreationDate) AS AnswerTime,
DATEDIFF(second, max(Q.CreationDate), min(A.CreationDate)) AS Elapse,
Year(max(Q.CreationDate))*12+Month(max(Q.CreationDate)) AS Slot
From Posts Q, Posts A
Where Q.PostTypeId = 1
and Q.Id = A.ParentId
and CHARINDEX(@Language, Q.Tags) != 0
Group by Q.Id, Q.Tags
Order by Elapse
Select min(CreationDate),
count(*) as [Count of Tickets],
-- min(Elapse) as [Min Time to Answer],
-- max(Elapse) as [Max Time to Answer],
avg(Elapse) as [Average time to first Answer]
From @AnswerTime
Group by Slot