Practice · History · Medium

Pharaohs per era

Count how many pharaohs fall in each era. Return era and a column named pharaohs, ordered by the count from high to low.

Runs in your browser. No signup needed.

What you are given

pharaohs(name, era). Use GROUP BY.

Starting point

SELECT era, COUNT(*) AS pharaohs
FROM pharaohs
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

Egyptologists group ~30 dynasties into eras (Old / Middle / New Kingdom, split by "Intermediate Periods" of fragmentation). (Oxford History of Ancient Egypt)

More History challenges

Open it in the playground →