Worst Posts of All Time

0

Please login or register to vote for this query.

(click on this box to dismiss)

Finds the posts (questions or answers) with the lowest scores

Poker Meta

Q&A about the site for serious players and enthusiasts of poker

-- Worst Posts of All Time
-- Finds the posts (questions or answers) with the lowest scores


WITH VoteCounts AS (
SELECT v.PostId AS PostId, vt.Name AS VoteTypeName
FROM Votes v
INNER JOIN VoteTypes vt ON v.voteTypeId = vt.Id
)
SELECT TOP 100 Id as [Post Link], Score, PostTypeId AS [Post Type]
, (SELECT COUNT(*) FROM VoteCounts vc WHERE vc.VoteTypeName = 'UpMod' AND vc.PostId = Id) AS [Total Up Votes]
, (SELECT COUNT(*) FROM VoteCounts vc WHERE vc.VoteTypeName = 'DownMod' AND vc.PostId = Id) AS [Total Down Votes]
FROM Posts
ORDER BY Score desc

Enter Parameters

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