Top Users by Country

0

Please login or register to vote for this query.

(click on this box to dismiss)

Motor Vehicle Maintenance and Repair Meta

Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles

SELECT 
    (CASE WHEN LOWER(Location) LIKE '%hong kong%' THEN 'hong kong'
    WHEN LOWER(Location) LIKE '%hungary%' THEN 'hungary'
    WHEN LOWER(Location) LIKE '%india%' THEN 'india'
    WHEN LOWER(Location) LIKE '%indonesia%' THEN 'indonesia'
    WHEN LOWER(Location) LIKE '%ireland' THEN 'ireland'
    WHEN LOWER(Location) LIKE '%israel%' THEN 'israel'
    WHEN LOWER(Location) LIKE '%italy%' THEN 'italy'
    WHEN LOWER(Location) LIKE '%japan%' THEN 'japan'
    END) as country, COUNT(Id)
FROM 
    Users
WHERE
    Reputation >= 1000
GROUP by (CASE WHEN LOWER(Location) LIKE '%hong kong%' THEN 'hong kong'
    WHEN LOWER(Location) LIKE '%hungary%' THEN 'hungary'
    WHEN LOWER(Location) LIKE '%india%' THEN 'india'
    WHEN LOWER(Location) LIKE '%indonesia%' THEN 'indonesia'
    WHEN LOWER(Location) LIKE '%ireland' THEN 'ireland'
    WHEN LOWER(Location) LIKE '%israel%' THEN 'israel'
    WHEN LOWER(Location) LIKE '%italy%' THEN 'italy'
    WHEN LOWER(Location) LIKE '%japan%' THEN 'japan'
    END)

Enter Parameters

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