User List: Top N - Cambodia

1

Please login or register to vote for this query.

(click on this box to dismiss)

Amateur Radio

Q&A for amateur radio enthusiasts

-- List of Users in Belgium
SELECT
    Top ##Top##
    
    ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [# by Rep], 
    Id AS [User Link], 
    Reputation,
    Location,
    --CreationDate,
    LastAccessDate,
    UpVotes,
    DownVotes
    
FROM
    Users

WHERE
     (
      lower(Location) LIKE lower('%Belgium%')
      -- http://sustainablesources.com/resources/country-abbreviations/
      
      --or UPPER(RIGHT(RTRIM(Location), 3)) = ' BE' -- many false positives, try "to be"
      or UPPER(RIGHT(RTRIM(Location), 3)) = ', BE'
      
      or UPPER(RIGHT(RTRIM(Location), 3)) = ',BE'
      or UPPER(Location) = 'BE'
      
      OR lower(Location) LIKE lower('%Bruxelles%')
      OR lower(Location) LIKE lower('%Brussels%')
      
      OR lower(Location) LIKE lower('%dummy%')
      or lower(Location) LIKE lower('%dummy%')
      or lower(Location) LIKE lower('%dummy%')
      or lower(Location) LIKE lower('%dummy%')
      or lower(Location) LIKE lower('%dummy%')
      or lower(Location) LIKE lower('%dummy%')
      or lower(Location) LIKE lower('%dummy%')
      )
      
       -- exclusions
       and not
       (   
       
       lower(Location) LIKE lower('%dummy%')
       or lower(Location) LIKE lower('%dummy%')
       or lower(Location) LIKE lower('%dummy%')
       or lower(Location) LIKE lower('%dummy%')
       
       --for testing
       or lower(Location) = lower('Belgium')
       
       or lower(Location) LIKE lower('%Aalst%')
       or lower(Location) LIKE lower('%Aalter%')
       
       or lower(Location) LIKE lower('%Aarsele%')
       or lower(Location) LIKE lower('%Aartselaar%')
       or lower(Location) LIKE lower('%Brussels%')
       
       
       
       
       or lower(Location) LIKE lower('%dummy%')
       or lower(Location) LIKE lower('%dummy%')
              
       )   
                  
   and LEN(Location) > 1
   --and Reputation > 1

    --Temporarily sort by location to more easily pick out false positive entries
    ORDER BY Location ASC;

Enter Parameters

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