Practice · History · Hard
Join monuments to their builder in pharaohs, then return each era and how many monuments it built (as monuments), most first.
Runs in your browser. No signup needed.
Join monuments.builder = pharaohs.name, GROUP BY era, COUNT the monuments.
SELECT p.era, COUNT(*) AS monuments
FROM monuments m
JOIN pharaohs p ON m.builder = p.name
GROUP BY p.era
ORDER BY monuments DESC;
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.
The New Kingdom left the densest monumental record — Karnak alone grew over 1,500 years as successive pharaohs each added to it. (Britannica)