User List: Top N - Turkey - with false positive exclusion

1

Please login or register to vote for this query.

(click on this box to dismiss)

List of Users in Turkey.

Amateur Radio

Q&A for amateur radio enthusiasts

-- List of Users in a given location
-- This query lists all users in a given location.



SELECT   RankNo, 
         [User Link], 
         Reputation, 
         --DisplayName, 
         Location

FROM
         (
            SELECT Id [User Link], Reputation, Location,
                   DENSE_RANK() OVER (ORDER BY Reputation DESC) RankNo
            FROM   Users
            WHERE 
            (
              lower(location) like lower('%##location##%')
              
               OR lower(Location) LIKE 'ankara'
               OR lower(Location) LIKE 'antalya'

               
               --Bakırköy - 2013 12 12
               -- Found with Turkey. Unsearchable on its own.
               -- independent search fails to find the one instance of this 
               OR lower(Location) LIKE 'bakırköy'
               
               
               --Eskişehir - 2013 12 12
               -- Found with Turkey. Unsearchable on its own.
               -- independent search fails to find the one instance of this
               OR lower(Location) LIKE 'eskişehir'
               
               
               OR lower(Location) LIKE 'bursa'
               OR lower(Location) LIKE 'gaziantep'
               OR lower(Location) LIKE 'istanbul'
               OR lower(Location) LIKE 'izmir'
               OR lower(Location) LIKE 'trabzon'
               
                )
    
          -- exclusions
             and not(lower(Location) LIKE '%australia%' -- TR
                  OR lower(Location) LIKE '%austria%'   -- TR
                   
                  )
                  
                  
                  
            ) derivedtable

WHERE    RankNo <= ##MaximumRankNo## and Reputation >= ##minimumReputation##
--ORDER    BY RankNo
ORDER    BY location

Enter Parameters

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