Practice · History · Medium

Years on the World Heritage list

For each UNESCO site, return the site and how many years it has been listed (2026 − year_inscribed) as years_listed, longest-listed first (ties by site name).

Runs in your browser. No signup needed.

What you are given

unesco_sites(site, year_inscribed). Simple year arithmetic.

Starting point

SELECT site, 2026 - year_inscribed AS years_listed
FROM unesco_sites
ORDER BY years_listed DESC, site;

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

Six of Egypt’s seven sites were inscribed in a single year, 1979 — a landmark moment for the young World Heritage list. (UNESCO)

More History challenges

Open it in the playground →