C++ rankings

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mathematics

Q&A for people studying math at any level and professionals in related fields

SELECT * FROM (
SELECT
  a.OwnerUserId [User Link],
  MONTH(v.CreationDate) + (YEAR(v.CreationDate) * 100) 'Date',
  SUM
  (
    CASE v.VoteTypeID
    WHEN 2 THEN 1
    WHEN 3 THEN -1
    END
  ) as Score
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,
   MONTH(v.CreationDate) + (YEAR(v.CreationDate) * 100),
   t.TagName
   ) SOURCE PIVOT (SUM(Score) FOR Date IN ([201501],[201502],[201503],[201504],[201505],[201506],[201507],[201508],[201509],[201510],[201511],[201512],[201601],[201602],[201603],[201604],[201605],[201606],[201607],[201608],[201609],[201610],[201611],[201612],[201701],[201702],[201703],[201704],[201705],[201706],[201707],[201708],[201709],[201710],[201711],[201712],[201801],[201802],[201803],[201804],[201805],[201806],[201807],[201808],[201809],[201810],[201811],[201812],[201901],[201902],[201903],[201904],[201905],[201906],[201907],[201908],[201909],[201910],[201911],[201912])) PT

Enter Parameters

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