tag answerer greater than score

1

Please login or register to vote for this query.

(click on this box to dismiss)

TeX - LaTeX

Q&A for users of TeX, LaTeX, ConTeXt, and related typesetting systems

DECLARE @TagName NVARCHAR(25) = '##TagName##';
DECLARE @MinimumScore INT = ##MinimumScore##;


SELECT
    ROW_NUMBER() OVER(ORDER BY SUM(a.Score) DESC) AS Pos, 
--    a.OwnerUserId AS [User Link],
    a.OwnerUserId AS UserId,
    SUM(a.Score) AS Score
FROM Posts a, Posts q
INNER JOIN PostTags qt
    ON q.Id = qt.PostId
INNER JOIN Tags t
    ON t.Id = qt.TagId
WHERE
    a.ParentId = q.Id
    AND a.PostTypeId = 2
    AND a.CommunityOwnedDate IS NULL
    AND t.TagName LIKE @TagName
GROUP BY
    a.OwnerUserId
    HAVING SUM(a.Score) >= @MinimumScore

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results