SELECT TOP 10 U.id AS [User Link], (SELECT sum(DateDiff(M...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

-- Enter Query Title
-- Enter Query Description
SELECT TOP 10
    U.id AS [User Link],
(SELECT
    sum(DateDiff(Minute, Q.CreationDate, A.CreationDate))
FROM 
    Posts Q, Posts A
WHERE 
    Q.PostTypeId = 1    -- Q is a question
    AND A.PostTypeId = 2    -- A is an answer
    AND A.ParentId = Q.Id   -- A answers Q
    AND DateDiff(Minute, Q.CreationDate, A.CreationDate) > 0
    AND U.Id = A.OwnerUserId) AS [Answer Time]
FROM
    Users U
ORDER BY U.Reputation DESC

Enter Parameters

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