select PostId from (select vt.PostId ,rank () over (order...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Open Source Meta

Q&A about the site for people organizing, marketing or licensing open source development projects

select
  PostId
from
  (select
    vt.PostId
    ,rank () over (order by count(1) desc) rnk
  from VoteTypes vtt
  join Votes vt on vtt.Id = vt.VoteTypeId
  where vtt.Name = 'UpMod'
  group by vt.PostId) r
where rnk <= 10
union all
select
  PostId
from
  (select
    vt.PostId
    ,rank () over (order by count(1) desc) rnk
  from VoteTypes vtt
  join Votes vt on vtt.Id = vt.VoteTypeId
  where vtt.Name = 'DownMod'
  group by vt.PostId) r
where rnk <= 10

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results