SELECT count(*) FROM PostLinks pl JOIN Posts as tp ON tp....

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 count(*)
FROM PostLinks pl
JOIN Posts as tp ON tp.Id = pl.PostId
--JOIN Users as tu ON tu.Id = tp.OwnerUserId
JOIN Posts as mp ON mp.Id = pl.RelatedPostId
--JOIN Users as mu ON mu.Id = mp.OwnerUserId
WHERE pl.LinkTypeId = 3
AND tp.CreationDate < mp.CreationDate
AND tp.Score < mp.Score
--AND pl.CreationDate > '2020-12-21 00:00:00'
--AND pl.CreationDate < '2020-12-28 00:00:00'

Enter Parameters

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