Practice · History · Hard

Obelisks joined to their builders

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.

What you are given

obelisks(name, pharaoh, height_m). pharaohs(name, dynasty, era). Join obelisks.pharaoh = pharaohs.name. Obelisks with shared or unknown attributions will simply not match.

Starting point

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.

Did you know

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.

More History challenges

Open it in the playground →