select reverse link by [score/viewcount]

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 3000 pl.CreationDate, pl.PostId AS [Post Link], pl.RelatedPostId AS [Post Link], 
( (tp.Score*1.0)/(tp.ViewCount+1)) as tp_qulity, ( (mp.Score*1.0)/(mp.ViewCount+1)) as mp_qulity
-- SELECT count(*)
FROM PostLinks pl
JOIN Posts as tp ON tp.Id = pl.PostId
JOIN Posts as mp ON mp.Id = pl.RelatedPostId
WHERE pl.LinkTypeId = 3
AND tp.CreationDate > mp.CreationDate
AND ((tp.Score*1.0)/(tp.ViewCount+1)) > ( (mp.Score*1.0)/(mp.ViewCount+1))
ORDER BY pl.CreationDate DESC

Enter Parameters

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