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 '%turkey%' 
              
               OR lower(Location) LIKE 'adana'
               OR lower(Location) LIKE 'adapazarı'
               --
               
               OR lower(Location) LIKE 'ankara'
               OR lower(Location) LIKE 'antalya'
               --

               OR lower(Location) LIKE 'bafra'
               OR lower(Location) LIKE 'bakırköy'
               --
               OR lower(Location) LIKE 'balıkesir'
               --
               OR lower(Location) LIKE 'beyşehir'
               OR lower(Location) LIKE 'bursa'
               
               OR lower(Location) LIKE 'eskişehir'
               --
               OR lower(Location) LIKE 'eskisehir'
               
               
               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