instruction: Posts that have an open bounty vote, but not close bounty vote.
response: WITH opened AS (SELECT PostId, COUNT(*) AS num FROM Votes WHERE VoteTypeId = 8 GROUP BY PostId), closed1 AS (SELECT PostId, COUNT(*) AS num FROM Votes WHERE VoteTypeId = 8 GROUP BY PostId), closed2 AS (SELECT ParentId AS PostId, COUNT(*) AS num FROM Posts AS p INNER JOIN Votes AS v ON p.Id = v.PostId WHERE VoteTypeId = 9 AND PostTypeId = 2 GROUP BY ParentId) SELECT o.PostId AS "post_link", o.num AS opencount, COALESCE(c1.num, 0) + COALESCE(c2.num, 0) AS closecount FROM opened AS o LEFT JOIN closed1 AS c1 ON o.PostId = c1.PostId LEFT JOIN closed2 AS c2 ON o.PostId = c2.PostId WHERE COALESCE(c1.num, 0) + COALESCE(c2.num, 0) < o.num