I've have a question to solve:
-list the names of countries where no city has a population over 1,000,000.
(I would think that this would mean that COUNT(name)should pull up names that are equal to zero. I'm not sure how to phrase that statement. Here is my code, there are two tables joined.
<mysql>SELECT ct.code, ct.fullname, COUNT(name) FROM city AS cy JOIN country AS ct ON cy.country = ct.code
WHERE cy.population < 1000000
GROUP BY ct.code
ORDER BY ct.code ASC;
+------+---------------------------------------+-------------+
| code | fullname | COUNT(name) |
+------+---------------------------------------+-------------+
| ABW | Aruba | 1 |
| AFG | Afghanistan | 3 |
| AGO | Angola | 4 |
| AIA | Anguilla | 2 |
| ALB | Albania | 1 |
| AND | Andorra | 1 |
| ANT | Netherlands Antilles | 1 |
| ARE | United Arab Emirates | 5 |