count of questions bounted

0

Please login or register to vote for this query.

(click on this box to dismiss)

SharePoint

Q&A for SharePoint enthusiasts

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

Enter Parameters

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