Practice · History · Medium
For each location, return the location and the earliest construction_start there (as earliest), oldest sites first.
Runs in your browser. No signup needed.
Use monuments. GROUP BY location and take MIN(construction_start).
SELECT location, MIN(construction_start) AS earliest
FROM monuments
GROUP BY location
ORDER BY earliest;
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.
Giza’s pyramids predate the Luxor and Aswan temples by over a thousand years — the Great Pyramid was already ancient when Ramesses II ruled. (Oxford History of Ancient Egypt)