Quem ganhou o concurso?

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow em Português Meta

Perguntas e respostas sobre o site para programadores profissionais e entusiastas

select top 5
  u.DisplayName [Nome],
  count(case when VoteTypeId = 2 then v.Id else null end) [Upvotes],
  count(case when VoteTypeId = 3 then v.Id else null end) [Downvotes],
  p.Score [Pontuação]
from Votes v
  inner join Posts p on p.Id = v.PostId
  inner join Users u on u.Id = p.OwnerUserId
where
  p.ParentId = 4999
group by p.Id, u.DisplayName, p.Score
order by count(case when VoteTypeId = 2 then v.Id else null end) desc

Enter Parameters

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