All countries, by number of major cities

Download
Author
PR 
Started at
2012-05-12 06:41 AM
Finished at
2012-05-12 06:41 AM (0 seconds)
SELECT countries.name, COUNT(DISTINCT cities.id) major_cities FROM cities
JOIN countries ON cities.country_code = countries.code
WHERE cities.population > 1000000
GROUP BY countries.name
ORDER BY major_cities DESC;
Executing query...
Problem!
Success! Query returned rows.