The top 20 questions with the most down-votes (ignores up-votes)
Q&A about the site for members of the workforce navigating the professional setting
-- Most Down-Voted Questions Related to Java -- The top 20 questions with the most down-votes related to Java (does NOT ignore up-votes) WITH vote_counts AS ( SELECT postid, SUM(CASE WHEN VoteTypeId = 2 THEN 1 WHEN VoteTypeId = 3 THEN -1 ELSE 0 END) AS vcnt FROM votes GROUP BY postid ) SELECT TOP 20 vcnt AS 'Net Vote Count', v.postid AS [Post Link], p.body FROM vote_counts v INNER JOIN posts p ON p.id = v.postid WHERE PostTypeId = 1 AND p.Tags LIKE '%<java>%' -- Filter posts that have the 'java' tag ORDER BY vcnt ASC;