Question response time on StackOverflow I thought that this was fun to share. I was wondering when should I give up all hope that my question would ever be answered and begin to start crying. So, I wrote a query for the StackOverflow DB that would give me that answer (in general). It calculates how many and what percentage of questions have been anwsered within an hour, day, week, month, 3 months, year and over a year. So if you like you can find that out yourself. Btw, the difference between the 2010 and full version shows some improvement, so that is very positive. :-P
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID('Comments') AND name = 'IX_CreationDate')
CREATE NONCLUSTERED INDEX IX_CreationDate
ON dbo.Comments(CreationDate)
GO


IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID('Posts') AND name = 'IX_PostID_CreationDate_Title')
CREATE NONCLUSTERED INDEX IX_PostID_CreationDate_Title
ON dbo.Posts(Id, CreationDate,Title)
GO

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID('Comments') AND name = 'IX_PostID_Text')
CREATE NONCLUSTERED INDEX IX_PostID_Text
ON dbo.Comments(PostId)
INCLUDE(Text)
GO


WITH BASE AS
(


SELECT 
    (SELECT COUNT(*)
    FROM Posts T1
    LEFT JOIN Comments T2 ON T1.Id = T2.PostId
    WHERE T2.CreationDate = (SELECT MIN(T3.CreationDate)
                                FROM Comments T3
                                WHERE T3.PostId = T1.Id)
    AND DATEDIFF(minute, T1.CreationDate, T2.CreationDate) BETWEEN 0 AND 59 ) AS WithinHour,

    (SELECT COUNT(*)
    FROM Posts T1
    LEFT JOIN Comments T2 ON T1.Id = T2.PostId
    WHERE T2.CreationDate = (SELECT MIN(T3.CreationDate)
                                FROM Comments T3
                                WHERE T3.PostId = T1.Id)
    AND DATEDIFF(minute, T1.CreationDate, T2.CreationDate) BETWEEN 60 AND 1440) AS WithinDay,

    (SELECT COUNT(*)
    FROM Posts T1
    LEFT JOIN Comments T2 ON T1.Id = T2.PostId
    WHERE T2.CreationDate = (SELECT MIN(T3.CreationDate)
                                FROM Comments T3
                                WHERE T3.PostId = T1.Id)
    AND DATEDIFF(minute, T1.CreationDate, T2.CreationDate) BETWEEN 1441 AND 10080) AS WithinWeek,

    (SELECT COUNT(*)
    FROM Posts T1
    LEFT JOIN Comments T2 ON T1.Id = T2.PostId
    WHERE T2.CreationDate = (SELECT MIN(T3.CreationDate)
                                FROM Comments T3
                                WHERE T3.PostId = T1.Id)
    AND DATEDIFF(minute, T1.CreationDate, T2.CreationDate) BETWEEN 10081 AND 44640) AS WithinMonth,

    (SELECT COUNT(*)
    FROM Posts T1
    LEFT JOIN Comments T2 ON T1.Id = T2.PostId
    WHERE T2.CreationDate = (SELECT MIN(T3.CreationDate)
                                FROM Comments T3
                                WHERE T3.PostId = T1.Id)
    AND DATEDIFF(minute, T1.CreationDate, T2.CreationDate) BETWEEN 44641 AND 132480) AS Within3Month,

    (SELECT COUNT(*)
    FROM Posts T1
    LEFT JOIN Comments T2 ON T1.Id = T2.PostId
    WHERE T2.CreationDate = (SELECT MIN(T3.CreationDate)
                                FROM Comments T3
                                WHERE T3.PostId = T1.Id)
    AND DATEDIFF(minute, T1.CreationDate, T2.CreationDate) BETWEEN 132481 AND 525600) AS WithinYear,

    (SELECT COUNT(*)
    FROM Posts T1
    LEFT JOIN Comments T2 ON T1.Id = T2.PostId
    WHERE T2.CreationDate = (SELECT MIN(T3.CreationDate)
                                FROM Comments T3
                                WHERE T3.PostId = T1.Id)
    AND DATEDIFF(minute, T1.CreationDate, T2.CreationDate) BETWEEN 525601 AND 7884000) AS OverAYear,

    (SELECT COUNT(*)
    FROM Posts T1
    LEFT JOIN Comments T2 ON T1.Id = T2.PostId
    WHERE T2.CreationDate = (SELECT MIN(T3.CreationDate)
                                FROM Comments T3
                                WHERE T3.PostId = T1.Id)
    AND DATEDIFF(minute, T1.CreationDate, T2.CreationDate) &gt; -1) AS Total
)

,

ResponseTime AS (

SELECT 
    WithinHour,
    CAST(CAST(WithinHour AS numeric(10,2)) / CAST(Total AS numeric(10,2)) * 100 AS numeric(5,2)) AS WithinHourPerc,
    WithinDay,
    CAST(CAST(WithinDay AS numeric(10,2)) / CAST(Total AS numeric(10,2)) * 100 AS numeric(5,2)) AS WithinDayPerc,
    WithinWeek,
    CAST(CAST(WithinWeek AS numeric(10,2)) / CAST(Total AS numeric(10,2)) * 100 AS numeric(5,2)) AS WithinWeekPerc,
    WithinMonth,
    CAST(CAST(WithinMonth AS numeric(10,2)) / CAST(Total AS numeric(10,2)) * 100 AS numeric(5,2)) AS WithinMonthPerc,
    Within3Month,
    CAST(CAST(Within3Month AS numeric(10,2)) / CAST(Total AS numeric(10,2)) * 100 AS numeric(5,2)) AS Within3MonthPerc,
    WithinYear,
    CAST(CAST(WithinYear AS numeric(10,2)) / CAST(Total AS numeric(10,2)) * 100 AS numeric(5,2)) AS WithinYearPerc,
    OverAYear,
    CAST(CAST(OverAYear AS numeric(10,2)) / CAST(Total AS numeric(10,2)) * 100 AS numeric(5,2)) AS OverAYearPerc,
    Total

FROM BASE

)

SELECT *
FROM ResponseTime