Q&A for enthusiasts and power users of the Android operating system
-- Sum of Upvotes for Questions and Answers by Daniel Kaplan with Time Difference Less Than 10 Seconds SELECT SUM(CASE WHEN q.PostTypeId = 1 THEN q.Score ELSE 0 END) AS TotalQuestionUpvotes, SUM(CASE WHEN a.PostTypeId = 2 THEN a.Score ELSE 0 END) AS TotalAnswerUpvotes 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) < 10 -- Time difference less than 10 seconds