Which users do have a post as favorite

1

Please login or register to vote for this query.

(click on this box to dismiss)

Chess

Q&A for serious players and enthusiasts of chess

Declare @PostId int = ##PostId##

SELECT
    v.Id
  , v.PostId
  , v.VoteTypeId
  , v.UserId
  , v.CreationDate
  , p.CreationDate
  , p.Score
  , p.ViewCount
  , p.OwnerUserId
  , p.Title
  , p.FavoriteCount
  , u.Reputation
  , u.CreationDate
  , u.DisplayName
  , u.UpVotes
  , u.DownVotes
FROM
    Votes v
INNER JOIN
    Posts p
ON
    p.Id = v.PostId
INNER JOIN
    Users u
ON
    u.Id = v.UserId
WHERE
    v.VoteTypeId = 5
AND v.PostId = @PostId

Enter Parameters

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