Rep collected by questions and answers

1

Please login or register to vote for this query.

(click on this box to dismiss)

It counts only accept/up/down votes on not deleted posts. PostTypeId = 1 means a question. PostTypeId = 2 means an answer.

Christianity

Q&A for committed Christians, experts in Christianity and those interested in learning more

SELECT
  SUM(
    CASE
      WHEN Votes.VoteTypeId = 1 THEN 15
      WHEN Votes.VoteTypeId = 3 THEN -2
      WHEN Posts.PostTypeId = 1 THEN 5
      ELSE 10
    END) AS Rep,
  Posts.PostTypeId
FROM Posts, Votes
WHERE
  Votes.PostId = Posts.Id
  AND
  Votes.VoteTypeId <= 3
  AND
  Posts.PostTypeId <= 2
GROUP BY Posts.PostTypeId

Enter Parameters

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