From whom I got downvotes

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow на русском

Q&A for программистов

Declare @UserId varchar
SELECT v.UserId, vt.Name, COUNT(*)
   FROM 
     Posts p
       INNER JOIN Votes v
         ON v.PostId = p.Id
       INNER JOIN VoteTypes vt
         ON v.VoteTypeId = vt.Id
  WHERE
     p.OwnerUserId = '804517'
  GROUP BY 
    vt.Name, v.UserId
  ORDER BY 1,3

Enter Parameters

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