Robusto 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?

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

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

declare @UserId int = ##UserId##;

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

select
  case
   when myScore > RobsScore then 'You win'
   when myScore < RobsScore then 'Robusto wins'
   else 'Tie'
  end as 'Winner',
  Question as [Post Link],
  myScore as 'My score',
  RobsScore as "Robs's score"
from fights;

Enter Parameters

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