Find questions which have 4 out of the required 5 votes to close.
Q&A for committed Christians, experts in Christianity and those interested in learning more
-- Find Questions Voted 4/5 To Close
-- Find questions which have 4 out of the required 5 votes to close.
SELECT Posts.Id AS [Post Link], COUNT(Votes.Id) as CloseVotes
LEFT JOIN Votes
ON (PostId = Posts.Id)
WHERE Posts.PostTypeId = 1
AND Votes.VoteTypeId = 6
GROUP BY Posts.Id
HAVING COUNT(Votes.Id) >= 4;