See all the votes on all my different posts grouped by vote type


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

declare @UserId int = ##UserId##;

with vote_results as (
  select votetypeid, count(*) as "number of votes"
  from posts 
  inner join votes
  on = votes.postid
  where posts.owneruserid = @Userid
  group by votetypeid

select *
from vote_results
inner join
on vote_results.votetypeid =
order by id

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results