Python answers of mine that were downvoted

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

SELECT
a.Id as [Post Link],
COUNT(DISTINCT v.Id)
FROM Votes AS v
INNER JOIN Posts AS a ON v.PostId = a.Id
INNER JOIN Posts As q ON q.Id = a.ParentId
INNER JOIN PostTags AS pt ON pt.PostId = q.Id
INNER JOIN Tags AS t ON pt.TagId = t.Id
INNER JOIN Users AS u ON a.OwnerUserId = u.Id
WHERE
    v.VoteTypeId = 3  -- Downvote
AND a.PostTypeId = 2  -- Answer
AND a.OwnerUserId != q.OwnerUserId  -- Ignoring self-answers
AND t.TagName LIKE 'python%'  -- All Python tags
AND u.Id = 100297
GROUP BY a.Id
ORDER BY 2 DESC

Enter Parameters

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