Top Users by Country

0

Please login or register to vote for this query.

(click on this box to dismiss)

Created by samliew (http://stackoverflow.com/users/584192/samuel-liew)

Stack Overflow

Q&A for professional and enthusiast programmers

-- Top Users by Country
-- Created by samliew (http://stackoverflow.com/users/584192/samuel-liew)
/*
SELECT
    ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [#], 
    Id AS [User Link], 
    Reputation
FROM
    Users
WHERE
    LOWER(Location) LIKE LOWER('%##CountryName##%')
ORDER BY
    Reputation DESC;
    
    */
    
select ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [#], 
    Id AS [User Link], 
    Reputation, 
    Location
  from Users 
  where 1 = 0
    OR LOWER(Location) LIKE LOWER('%Romania%')
    OR LOWER(Location) LIKE LOWER('%Rumänien%')
    OR LOWER(Location) LIKE LOWER('%Roumanie%')

Enter Parameters

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