Practice · History · Hard
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.
obelisks(pharaoh, height_m). Group, then filter the groups.
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.
Shared attributions such as "Seti I / Ramesses II" are counted as their own group here — the data records the ambiguity instead of resolving it.