declare @PostId int = ##PostId##; select * from [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

declare @PostId int = ##PostId##;

-- select Users.Id as 'ID', Users.DisplayName as 'Nick', Users.Reputation as 'Reputation' 
-- from Users left join Votes on Users.Id = Votes.UserId left join Posts on Votes.PostId = Posts.Id 
-- where Posts.Id = @PostId order by Users.Reputation desc

select * from [Votes] left join Posts on [Votes].[PostId] = Posts.Id where Posts.Id = @PostId

Enter Parameters

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