Created
October 31, 2012 01:46
-
-
Save guilespi/3984333 to your computer and use it in GitHub Desktop.
StackOverflow response times by language, easy questions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select TagName, | |
avg(cast(ResponseTime as bigint)) as Average, | |
stdev(cast(ResponseTime as bigint)) as StandardDev | |
from | |
(SELECT | |
Questions.CreationDate, | |
Questions.Title, | |
Tags.TagName, | |
Answers.CreationDate as ResponseDate, | |
datediff(minute, Questions.CreationDate, | |
Answers.CreationDate) as ResponseTime, | |
cast(DATEPART(hour, Questions.CreationDate) as int) as ResponseHour | |
FROM Posts Questions | |
join Posts Answers on Answers.id = Questions.AcceptedAnswerId | |
and datediff(hour, Questions.CreationDate, Answers.CreationDate) < 5 | |
join PostTags ON PostTags.PostId = Questions.Id | |
join Tags on Tags.Id = PostTags.TagId | |
WHERE Questions.CreationDate > convert(datetime, '01/01/2012', 101) | |
and TagName in ('ruby', 'c++', 'c', 'clojure', | |
'scala', 'javascript', 'haskell', | |
'c#', 'java', 'lua', 'php') | |
) as Responses | |
group by TagName | |
order by TagName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment