Reputation collected on closed questions

1

Please login or register to vote for this query.

(click on this box to dismiss)

It counts only the votes (edits, bounties are not calculated). Possibly not invalidated votes on deleted questions don't count, too.

Portuguese Language

Q&A for linguists, teachers and learners wanting to discuss the finer points of the Portuguese language

WITH Raw AS (
  SELECT
    CASE
      WHEN Votes.VoteTypeId = 1 THEN 2
      WHEN Votes.VoteTypeId = 2 AND Posts.PostTypeId = 1 THEN 5
      WHEN Votes.VoteTypeId = 3 AND Posts.PostTypeId = 1 THEN -2
      WHEN Votes.VoteTypeId = 2 AND Posts.PostTypeId = 2 THEN 10
      WHEN Votes.VoteTypeId = 3 AND Posts.PostTypeId = 2 THEN -3
      ELSE NULL -- unreachable code
    END AS Rep,
    COALESCE(Posts.ClosedDate, Parent.ClosedDate) AS IsClosed
  FROM Votes
  LEFT JOIN Posts ON Votes.PostId = Posts.Id
  LEFT JOIN Posts Parent ON Posts.ParentId = Parent.Id
  WHERE Votes.VoteTypeId <= 3
)
SELECT SUM(Rep) AS Rep, 'Total' AS Type FROM Raw
UNION
SELECT SUM(Rep) AS Rep, 'FromClosedQuestions' AS Type FROM Raw
WHERE IsClosed IS NOT NULL;

Enter Parameters

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