Users by location LIKE 2 tags !

0

Please login or register to vote for this query.

(click on this box to dismiss)

3D Printing Meta

Q&A about the site for 3D printing enthusiasts

SELECT us.id [User Link],
       us.DisplayName [Name],
       us.age,
       us.Reputation,
       us.Location,
       tuser.Score [Tag Score],
       tuser.Answers [Tag Answers]
        
FROM Users us

JOIN 
(SELECT
  Answers.OwnerUserId AS UserId,
  SUM(Answers.Score) AS Score,
  COUNT(*) AS Answers
     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 LIKE '##TagName##'
  GROUP BY Answers.OwnerUserId
) tuser ON tuser.UserId = us.Id

WHERE
  UPPER(us.Location) like UPPER('%##Location?israel##%') AND
  Reputation > ##MinimumReputation:int?1000## AND
  Answers >= ##MinimumTagAnswers:int?10##
ORDER BY Reputation DESC

Enter Parameters

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