SELECT * FROM Users U WHERE U.Id IN ( SELECT TOP 1000 P.O...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Music Fans

Q&A for music historians, critics, and fans

SELECT *
FROM Users U
WHERE U.Id IN
(
        SELECT TOP 1000
            P.OwnerUserId
            FROM Posts P 
              JOIN PostTags PT ON (P.Id = PT.PostId) 
              JOIN Tags T ON (PT.TagId = T.Id)
        WHERE 
        T.TagName = 'c#'
        )--   charindex(T.TagName,@TagNames) > 0
OR
U.Id IN
(
  SELECT
      B.UserId
  FROM
      Badges B
  WHERE
      B.UserId IN ( SELECT U.Id FROM Users U WHERE 
                          U.id IN (SELECT TOP 1000 P.Id FROM Posts P 
                                      JOIN PostTags PT ON (P.Id = PT.PostId)
                                      JOIN Tags T ON (PT.TagId = T.Id)
                                  WHERE T.TagName = 'c#'))
)
OR
U.Id IN
(
SELECT C.UserId
FROM Comments C
WHERE C.PostId IN
(
        SELECT TOP 1000
            P.Id
            FROM Posts P 
              JOIN PostTags PT ON (P.Id = PT.PostId) 
              JOIN Tags T ON (PT.TagId = T.Id)
        WHERE 
        T.TagName = 'c#'
        )--   charindex(T.TagName,@TagNames) > 0
)
OR
U.Id IN
(
SELECT V.UserId
FROM Votes V
WHERE V.PostId IN
(
        SELECT TOP 1000
            P.Id
            FROM Posts P 
              JOIN PostTags PT ON (P.Id = PT.PostId) 
              JOIN Tags T ON (PT.TagId = T.Id)
        WHERE 
        T.TagName = 'c#'
        )
)
ORDER BY U.Id

Enter Parameters

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