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, for example "to be"
      or UPPER(RIGHT(RTRIM(Location), 3)) = ', BE'
      
      or UPPER(RIGHT(RTRIM(Location), 3)) = ',BE'
      or UPPER(Location) = 'BE'
      
      or lower(Location) = lower('%Antwerp%') -- Assumed Belgium
      or lower(Location) like lower('%Antwerpen%')
      
      or lower(Location) LIKE lower('%Bruges%')
      or lower(Location) LIKE lower('%Bruxelles%')
      or lower(Location) LIKE lower('%Brussels%')
      
      or lower(Location) LIKE lower('%Dilsen%')
      
      or lower(Location) LIKE lower('%st%Flanders%') -- East and West Flanders
      
      or lower(Location) = lower('Ghent') -- Assumed Belgium
      
      or lower(Location) LIKE lower('%Lokeren%Ghent%')
      or lower(Location) LIKE lower('%Ghent%EU%')
      or lower(Location) LIKE lower('%Ghent%Flanders%')
      
      or lower(Location) LIKE lower('%Flemish Region%')  -- Assumed Belgium
      
      or lower(Location) = lower('Hasselt')  -- Assumed Belgium
      or lower(Location) = lower('Hoogstraten')  -- Assumed Belgium
      
      or lower(Location) LIKE lower('%Ieper%') -- Ypres  -- Assumed Belgium
      
      or lower(Location) = lower('Kortrijk') -- Assumed Belgium
      
      or lower(Location) LIKE lower('%Leuven%')
      or lower(Location) LIKE lower('%Lokeren%')
      
      or lower(Location) LIKE lower('%Mechelen%')
      or lower(Location) = lower('Mons') -- Assumed Belgium
      
      or lower(Location) LIKE lower('%Namur%')
      
      or lower(Location) LIKE lower('%st%Vlaanderen%') -- Oost and West
      or lower(Location) = lower('Vilvoorde') -- Assumed Belgium
      
      or lower(Location) LIKE lower('%Waregem%')

      or lower(Location) = lower('Ypres') -- Assumed Belgium
      )
      
       -- exclusions
       and not
       (   
          lower(Location) LIKE lower('%dummy%')
       or lower(Location) LIKE lower('%dummy%')

       --for testing
       --or lower(Location) = lower('Belgium')
       --or lower(Location) like lower('%, Belgium')
       --or lower(Location) LIKE lower('%Brussel%')
       
       )   
                  
   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