Practice · History · Hard
Join obelisks to pharaohs on the builder name and return the obelisk name, o.pharaoh, the dynasty and the era, tallest obelisk first.
Runs in your browser. No signup needed.
obelisks(name, pharaoh, height_m). pharaohs(name, dynasty, era). Join obelisks.pharaoh = pharaohs.name. Obelisks with shared or unknown attributions will simply not match.
SELECT o.name, o.pharaoh, p.dynasty, p.era
FROM obelisks o
JOIN pharaohs p ON ...
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.
An INNER JOIN silently drops what does not match — here the obelisks credited to two kings at once, or to nobody, vanish from the result.