list based on location

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow en español

Preguntas y respuestas para programadores y profesionales de la informática

-- List users and their details by tag and location
SELECT us.DisplayName, 
us.Id as [User Link],
  us.Reputation,
  us.WebsiteUrl,
  us.LastAccessDate,
  us.Location,
tuser.Score
FROM Users us
JOIN
(SELECT TOP 1000 Answers.OwnerUserId AS UserId, SUM(Answers.Score) AS Score
     FROM Tags
    JOIN PostTags ON Tags.Id = PostTags.TagId
    JOIN Posts ON Posts.Id = PostTags.PostId  
    JOIN Posts Answers ON Answers.ParentId = Posts.Id
   WHERE Tags.TagName = '##TagName##'
  GROUP BY Answers.OwnerUserId
ORDER BY SUM(Posts.Score) DESC
) tuser ON tuser.UserId = us.Id
WHERE Location LIKE '%##Location##%'
ORDER BY tuser.Score DESC

Enter Parameters

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