My Top Voted Answer Rate


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##

SELECT Id AS [Post Link]
FROM Posts a
WHERE a.OwnerUserId = @UserId
AND a.PostTypeId = 2
AND (Score = 
(SELECT Max(Score) FROM Posts b WHERE b.ParentId = a.ParentId));

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results