A user gained 285 upvotes by answering himself in less that 1 second!

0

Please login or register to vote for this query.

(click on this box to dismiss)

Computer Science

Q&A for students, researchers and practitioners of computer science

SELECT 
    q.Id AS QuestionId,
    q.Title AS QuestionTitle,
    q.CreationDate AS QuestionCreationDate,
    q.Score AS QuestionScore,
    a.Id AS AnswerId,
    a.CreationDate AS AnswerCreationDate,
    a.Score AS AnswerScore,
    DATEDIFF(second, q.CreationDate, a.CreationDate) AS TimeDifferenceInSeconds,  -- Time difference in seconds
    (q.Score + a.Score) AS GainedUpvotes
FROM 
    Posts AS q
JOIN 
    Posts AS a ON q.Id = a.ParentId
WHERE 
    q.PostTypeId = 1  -- 1 indicates questions
    AND a.PostTypeId = 2  -- 2 indicates answers
    AND q.OwnerUserId = 61624  -- User ID for Daniel Kaplan
    AND a.OwnerUserId = 61624  -- User ID for Daniel Kaplan
    AND DATEDIFF(second, q.CreationDate, a.CreationDate) < 1 -- answered himself in less that 3 seconds
ORDER BY 
    q.CreationDate DESC

Enter Parameters

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