Percentage of bounties with accepted answer depending on the day when the bounty started

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

;WITH tmp AS
(SELECT p.Id, p.AcceptedAnswerId AS Acc,
    Period =DATEPART("weekday", bs.CreationDate)
FROM Posts p INNER JOIN Votes bs
    ON p.Id = bs.PostId
    AND bs.VoteTypeId = 8  -- BountyStart
)
SELECT Period, ROUND((COUNT(Acc))*100.0/(COUNT(*)),2) AS percentage
FROM tmp
GROUP BY Period
ORDER BY Period

Enter Parameters

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