C++ rankings

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow em Português

Perguntas e respostas para programadores profissionais e entusiastas

SELECT TOP 100
  a.OwnerUserId
FROM 
  Votes v
    INNER JOIN
  Posts a ON v.PostID = a.ID
   INNER JOIN
  Posts q ON a.parentId = q.id
   INNER JOIN
  PostTags pt ON q.id = pt.PostId
   INNER JOIN
  Tags T ON pt.TagId = t.id
WHERE
  v.voteTypeId in (2,3) AND
  a.PostTypeID = 2 AND
  (
    a.CommunityOwnedDate IS NULL OR
    a.CommunityOwnedDate > v.CreationDate
  ) AND
  a.OwnerUserId IS NOT NULL AND
  t.TagName = 'c++'
GROUP BY
   a.OwnerUserId--,
--   t.TagName
ORDER BY
  SUM
  (
    CASE v.VoteTypeID
    WHEN 2 THEN 1
    WHEN 3 THEN -1
    END
  ) DESC

Enter Parameters

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