Get score by post type for UserId

1

Please login or register to vote for this query.

(click on this box to dismiss)

Raspberry Pi

Q&A for users and developers of hardware and software for Raspberry Pi

Select (Select SUM(Score) From Posts where OwnerUserId = ##UserId## AND PostTypeId = 2) AS AnswerScore,
(Select SUM(Score) From Posts where OwnerUserId = ##UserId## AND PostTypeId = 1) AS QuestionScore,
(Select SUM(Score) From Comments where UserId = ##UserId##) AS CommentScore,
(Select TOP(1) DisplayName From Users where Id = ##UserId##) As UserName

Enter Parameters

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