Show users who marked my posts as "favorites", and which posts they marked...
Q&A for professional and enthusiast programmers
-- Who Favorited Me? -- Show users who marked my posts as "favorites", and which posts they marked... DECLARE @UserId int = ##UserId## SELECT v.userid, t.name AS [User Link], t.Name, p.id AS [Post Link] FROM votes v, votetypes t, posts p --join posts --ON p.id=v.postid WHERE p.owneruserid=@UserID AND v.votetypeid=t.Id