SELECT TOP 1000 Id AS [Post Link], MaxAnswerScore, q.View...

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

SELECT TOP 1000 Id AS [Post Link], MaxAnswerScore, q.ViewCount/ NULLIF(ISNULL(MaxAnswerScore * 1.00 ,0.001),0),Q.*
FROM Posts q
OUTER APPLY
(
SELECT TOP 1 Score AS MaxAnswerScore
FROM Posts a 
WHERE a.ParentId = q.Id AND Score > 0
ORDER BY a.Score DESC
) CA
WHERE q.Tags LIKE '%sql-server%'
AND q.PostTypeId = 1
AND q.ViewCount/ NULLIF(ISNULL(MaxAnswerScore * 1.00 ,0.001),0) > 5000
ORDER BY q.ViewCount DESC

Enter Parameters

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