examples of first score if body contains "downvote"

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 p.Id, p.Score as ave
FROM POSTS p
LEFT JOIN USERS u
ON p.OwnerUserId = u.Id
LEFT JOIN (
    SELECT u.Id as u_id, min(p.ID) as min_pid
    FROM POSTS p
    LEFT JOIN USERS u
    ON p.OwnerUserId = u.Id
    GROUP BY u.Id) as mp
ON mp.u_id = u.Id AND mp.min_pid = p.Id
WHERE p.PostTypeId = 1 AND p.Body LIKE '%downvote%' and p.Id > 48750000 and p.Id < 50000000
ORDER BY p.Score DESC

Enter Parameters

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