Top N Users: New Your City

0

Please login or register to vote for this query.

(click on this box to dismiss)

Computational Science

Q&A for scientists using computers to solve scientific problems

SELECT  RankNo, 
         [User Link], 
         Reputation, 
         Location

FROM
       (
        SELECT Id [User Link], Reputation, Location,
               DENSE_RANK() OVER (ORDER BY Reputation DESC) RankNo
        
          FROM   Users
             
            WHERE 
              (
                 lower(Location) LIKE '%new york city%'
              or lower(Location) LIKE '%nyc%'
               )   
                  
        ) derivedtable

WHERE   LEN(Location) > 1  and  RankNo <= ##MaximumRankNo## 

--ORDER    BY RankNo
ORDER    BY location  -- To see incorrectly selected entries

Enter Parameters

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