Q&A for professional and enthusiast programmers
select u.displayname, 'http://stackoverflow.com/users/' + CAST(u.id as varchar(255)) as [httplink], u.reputation, count(v.id) as [votes] from users u inner join votes v on v.userId = u.id inner join posts p on p.id = v.postId inner join posts ans on p.id = ans.parentId inner join posttags pt on p.id = pt.postid inner join tags t on pt.tagid = t.id where lower(u.location) like '%##LocationLowerCase##%' and p.parentId IS NULL and t.tagname in ('##TagsLowerCase##') group by u.id, u.displayName, u.reputation order by count(v.id) DESC