Top Users by Country

0

Please login or register to vote for this query.

(click on this box to dismiss)

The Great Outdoors

Q&A for people who love being outdoors enjoying nature and wilderness, and learning about the required skills and equipment

SELECT 
    (CASE WHEN LOWER(Location) LIKE '%argentina%' THEN 'Argentina'
    WHEN LOWER(Location) LIKE '%armenia%' THEN 'Armenia'
    WHEN LOWER(Location) LIKE '%australia%' THEN 'Australia'
    WHEN LOWER(Location) LIKE '%austria%' THEN 'Austria'
    WHEN LOWER(Location) LIKE '%bangladesh%' THEN 'Bangladesh'
    WHEN LOWER(Location) LIKE '%belarus%' THEN 'Belarus'
    WHEN LOWER(Location) LIKE '%belgium%' THEN 'Belgium'
    WHEN LOWER(Location) LIKE '%brazil%' THEN 'Brazil'
    END) as country, COUNT(Id)
FROM 
    Users
WHERE
    Reputation >= 1000
GROUP by (CASE WHEN LOWER(Location) LIKE '%argentina%' THEN 'Argentina'
    WHEN LOWER(Location) LIKE '%armenia%' THEN 'Armenia'
    WHEN LOWER(Location) LIKE '%australia%' THEN 'Australia'
    WHEN LOWER(Location) LIKE '%austria%' THEN 'Austria'
    WHEN LOWER(Location) LIKE '%bangladesh%' THEN 'Bangladesh'
    WHEN LOWER(Location) LIKE '%belarus%' THEN 'Belarus'
    WHEN LOWER(Location) LIKE '%belgium%' THEN 'Belgium'
    WHEN LOWER(Location) LIKE '%brazil%' THEN 'Brazil'
    END)

Enter Parameters

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