Q&A about the site for people who build and repair bicycles, people who train cycling, or commute on bicycles
WITH RankedUpVotes AS ( SELECT TOP 10 COUNT(v.Id) VoteCount, v.PostId FROM Votes v WHERE v.VoteTypeId = 2 GROUP BY v.PostId ORDER BY count(v.Id) DESC ), RankedDownVotes as ( SELECT TOP 10 COUNT(v.Id) VoteCount, v.PostId FROM Votes v WHERE v.VoteTypeId = 3 GROUP BY v.PostId ORDER BY count(v.Id) DESC ) SELECT PostId FROM RankedUpVotes UNION ALL SELECT PostId FROM RankedDownVotes;