Practice · History · Medium

Obelisks by country

Count the obelisks in each country. Return current_country and a column named obelisks, most first, breaking ties by country name.

Runs in your browser. No signup needed.

What you are given

obelisks(current_country). Use GROUP BY.

Starting point

SELECT current_country, COUNT(*) AS obelisks
FROM obelisks
GROUP BY ...
ORDER BY ...;

The reference solution is checked automatically when you run your query on the practice page — results are compared row by row, and order matters for this one.

Did you know

Italy holds more ancient Egyptian obelisks than any country except Egypt itself — Rome’s emperors shipped them home as trophies after 31 BCE. (Wikipedia, Egyptian obelisks)

More History challenges

Open it in the playground →