Questions by tag with score 1 or greater and answer score 4 or greater

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

-- Tag: All questions tagged with:
DECLARE @Tag nvarchar(100) = ##Tag:string##

SELECT q.Id AS [Post Link], q.Tags, q.Score, q.Title, q.ClosedDate, 
   (SELECT SUM(Score) FROM Posts A WHERE q.Id = A.ParentId AND A.Score > 0) AS asco

FROM Posts q

WHERE q.PostTypeId = 1 and q.Score > 0 and q.Tags LIKE '%<' + @Tag + '>%'
   AND (SELECT SUM(Score) FROM Posts A WHERE q.Id = A.ParentId AND A.Score > 0) >= 4
ORDER BY asco DESC

Enter Parameters

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