SELECT TOP 10 COUNT(v.Id) FROM Posts AS p LEFT JOIN Votes...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT TOP 10
  COUNT(v.Id)
FROM
  Posts AS p
  LEFT JOIN Votes AS V on p.Id=v.PostId
WHERE
  p.PostTypeId = 1 AND
  (
    v.VoteTypeId = 2 OR
    v.VoteTypeId = 3
  )
GROUP BY
  p.PostTypeId,
  v.VoteTypeId

Enter Parameters

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