Find by tags with grouping

0

Please login or register to vote for this query.

(click on this box to dismiss)

Role-playing Games

Q&A for gamemasters and players of tabletop, paper-and-pencil role-playing games

SELECT Users.Id, DisplayName, EmailHash, Reputation, Location, STRING_AGG(cast(Tags as NVARCHAR(MAX)), CHAR(32))
FROM Users 
INNER JOIN PostHistory ph 
	ON ph.UserId = Users.Id 
INNER JOIN posts 
	ON posts.Id = ph.PostId 
    WHERE LOWER(Tags) LIKE LOWER('%##skill1##%') AND LOWER(Tags) LIKE LOWER('%##skill2##%') 
AND LOWER(Location) LIKE LOWER('%##location##%')
GROUP BY Users.Id, DisplayName, EmailHash, Reputation, Location 
ORDER BY Reputation DESC

Enter Parameters

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