Top users by country

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select distinct [user link],reputation from(
SELECT
    Top ##Top##
    ROW_NUMBER() OVER(partition by users.id ORDER BY Reputation DESC) AS [#], 
    users.displayname AS [User Link], 
    Reputation
FROM
    Users inner join posts
    on users.id=posts.owneruserid
WHERE
     LOWER(Location) LIKE LOWER('%##FullCountryName##%') and Tags like N'%tsql%'
     ) as k
    ORDER BY
    reputation DESC;

Enter Parameters

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