Tags of the questions posts from top 5000 users

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

select P.Id as PID, topUser.UserId, topUser.DisplayName, topUser.Reputation, P.Tags
from
    (select top 5000
        RANK() OVER(ORDER BY U.Reputation DESC) AS Rank,
        U.Id as UserId,
        U.DisplayName,
        U.Reputation
     from Users U
     where U.Reputation >= 5000
     group by U.Id, U.Reputation, U.DisplayName
     Order by U.Reputation DESC) as topUser
join Posts P on P.OwnerUserId = topUser.UserId
join Posts pq on pq.parentId = P.Id
where exists (select parentId from Posts)
group by topUser.UserId, topUser.DisplayName, topUser.Reputation, P.Tags, P.id
order by topUser.reputation DESC

Enter Parameters

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