Originating posting locations for a tag

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 Owner.Location, COUNT(*) AS Count
FROM Tags AS Tag
JOIN PostTags AS pt ON pt.TagId = Tag.Id
JOIN Posts AS Post ON Post.Id = pt.PostId
JOIN Users AS Owner ON Owner.Id = Post.OwnerUserId
WHERE Tag.TagName LIKE ##tagName:string## AND Post.ParentId Is Null
GROUP BY Owner.Location
ORDER BY COUNT(*) DESC

Enter Parameters

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