Top users netherlands

0

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace Meta

Q&A about the site for members of the workforce navigating the professional setting

SELECT --TOP 20 
    ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC) AS [#], 
    Posts.OwnerUserId AS [User Link],
    COUNT(*) AS UpVotes 
FROM Tags
    INNER JOIN PostTags ON PostTags.TagId = Tags.id
    INNER JOIN Posts ON Posts.ParentId = PostTags.PostId
    INNER JOIN Votes ON Votes.PostId = Posts.Id and VoteTypeId = 2
    INNER JOIN Users ON Posts.OwnerUserid = Users.Id
WHERE 
    Tags.Id = 9
    AND
    (
      LOWER(Location) LIKE '%netherland%'
      OR
      LOWER(Location) LIKE '%nederland%'
      OR
      UPPER(Location) LIKE '%NL'
    )
GROUP BY TagName, Posts.OwnerUserId
ORDER BY UpVotes DESC

Enter Parameters

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