Practice · History · Hard

Pharaohs who raised several

Return each pharaoh credited with 2 or more obelisks as pharaoh, obelisks and avg_height_m (rounded to 2 decimals), most obelisks first.

Runs in your browser. No signup needed.

What you are given

obelisks(pharaoh, height_m). Group, then filter the groups.

Starting point

SELECT pharaoh, COUNT(*) AS obelisks, ROUND(AVG(height_m), 2) AS avg_height_m
FROM obelisks
GROUP BY pharaoh
HAVING ...
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

Shared attributions such as "Seti I / Ramesses II" are counted as their own group here — the data records the ambiguity instead of resolving it.

More History challenges

Open it in the playground →