City vs Tag (Gold badge/Skill)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Engineering

Q&A for professionals and students of engineering

---- City vs Tag (gold badge)

SELECT u.Id AS [User Link],
                           CONCAT('https://stackoverflow.com/users/', u.Id) AS [Profile Link],
                           u.Reputation,
                           u.Location,
                           u.WebsiteUrl,
                           u.AboutMe,
                           u.Views,
                           u.UpVotes,
                           u.DownVotes
            FROM Users u
       
            JOIN (
                   SELECT DISTINCT UserId
                   FROM Badges
                   WHERE LOWER(Name) IN ('##tagname##') AND
                         Class IN (1) AND
                         TagBased = 1
                 ) tag_badges
            ON tag_badges.UserId = u.Id
           
            WHERE LOWER(Location) LIKE '%##cityname##%'
            
            Order by Reputation desc

Enter Parameters

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