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?

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @UserId int = ##UserId##;


    SELECT y.ParentId
          ,sum(y.Score) yScore
          ,sum(CASE WHEN q.AcceptedAnswerId = y.Id THEN 1 ELSE 0 END) acc
    FROM   Posts y
    JOIN   Posts q ON q.id = y.ParentId
    WHERE  y.OwnerUserId = @UserId  -- your id
    AND    y.postTypeId  = 2
    GROUP  BY y.ParentId

Enter Parameters

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