Q&A for administrators and users of the CiviCRM Constituent Relationship Management software
SELECT u.Id AS [User Link], CONCAT('https://stackoverflow.com/users/', u.Id) AS [Profile Link], u.DisplayName, 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 ('debian') AND Class IN (1, 2, 3) AND TagBased = 1 ) tag_badges ON tag_badges.UserId = u.Id WHERE LOWER(Location) LIKE '%stuttgart%'