Jon Skeet comparison

0

Please login or register to vote for this query.

(click on this box to dismiss)

What questions does Jon Skeet have a higher/lower score on than me?

Raspberry Pi

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

declare @UserId int = ##UserId##;

with fights as (
  select myAnswer.ParentId as Question,
   myAnswer.Score as MyScore,
   jonsAnswer.Score as JonsScore
  from Posts as myAnswer
  inner join Posts as jonsAnswer
   on jonsAnswer.OwnerUserId = 562459 and myAnswer.ParentId = jonsAnswer.ParentId
  where myAnswer.ownerUserId = @UserId and myAnswer.postTypeId = 2
)

select
  sum(myScore) as 'My score',
  sum(jonsScore) as "Jon's score"
from fights;

Enter Parameters

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