Q&A about the site for enthusiasts and scholars of mythology and folklore
SELECT COUNT(DISTINCT p.Id) AS BountyQuestionsCount FROM Posts p JOIN Votes v ON p.Id = v.PostId WHERE p.PostTypeId = 1 -- Filter for questions AND v.VoteTypeId = 8; -- VoteTypeId = 8 corresponds to bounties