SELECT vouter.CreationDate as "Time", (SELECT SUM(vinner....

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

SELECT
  vouter.CreationDate as "Time",
  (SELECT
     SUM(vinner.BountyAmount * (1 - 2*(vinner.VoteTypeId % 2)))
   FROM
     Votes AS vinner
   WHERE
     vinner.VoteTypeId IN (8, 9) AND
     vinner.CreationDate <= vouter.CreationDate
   ) AS "Outstanding Bounty",
   (1 - 2*(vouter.VoteTypeId % 2)),
   vouter.BountyAmount
FROM
  Votes AS vouter
WHERE
  vouter.VoteTypeId IN (8, 9)
ORDER BY
  vouter.CreationDate ASC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results