Top N Users in Country

0

Please login or register to vote for this query.

(click on this box to dismiss)

from http://data.stackexchange.com/stackoverflow/query/148176/top-users-by-country

Stack Overflow en español

Preguntas y respuestas para programadores y profesionales de la informática

SELECT
    Top ##Top##
    ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [#], 
    Id AS [User Link], 
    Reputation,
    Location
FROM
    Users
WHERE
     LOWER(Location) LIKE LOWER('%##FullCountryName##%')
     
     -- http://sustainablesources.com/resources/country-abbreviations/
  OR (Location) LIKE UPPER('%##ShortCountryName##') -- last characters
  
ORDER BY
    Reputation DESC;
    
    -- Sort by location to more easily pick out false positive entries
    --Location ASC;

Enter Parameters

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