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 '%romania%' THEN 'romania'
    WHEN LOWER(Location) LIKE '%saudi%' THEN 'saudi'
    WHEN LOWER(Location) LIKE '%serbia%' THEN 'serbia'
    WHEN LOWER(Location) LIKE '%singapore%' THEN 'singapore'
    WHEN LOWER(Location) LIKE '%slovakia' THEN 'slovakia'
    WHEN LOWER(Location) LIKE '%slovenia%' THEN 'slovenia'
    WHEN LOWER(Location) LIKE '%south africa%' THEN 'south africa'
    WHEN LOWER(Location) LIKE '%korea%' THEN 'korea'
    END) as country, COUNT(Id)
FROM 
    Users
WHERE
    Reputation >= 1000
GROUP by    (CASE WHEN LOWER(Location) LIKE '%romania%' THEN 'romania'
    WHEN LOWER(Location) LIKE '%saudi%' THEN 'saudi'
    WHEN LOWER(Location) LIKE '%serbia%' THEN 'serbia'
    WHEN LOWER(Location) LIKE '%singapore%' THEN 'singapore'
    WHEN LOWER(Location) LIKE '%slovakia' THEN 'slovakia'
    WHEN LOWER(Location) LIKE '%slovenia%' THEN 'slovenia'
    WHEN LOWER(Location) LIKE '%south africa%' THEN 'south africa'
    WHEN LOWER(Location) LIKE '%korea%' THEN 'korea'
    END)

Enter Parameters

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