Users by location LIKE 2 tags !

0

Please login or register to vote for this query.

(click on this box to dismiss)

Motor Vehicle Maintenance and Repair

Q&A for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles

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 meta site
loading Hold tight while we fetch your results