Practice · Economy · Hard

The pound’s yearly slide (% change)

For each year, return year, egp_per_usd, and the percent change from the previous year as pct (1 decimal), oldest first.

Runs in your browser. No signup needed.

What you are given

(rate − LAG(rate)) × 100.0 / LAG(rate) OVER (ORDER BY year). Use 100.0 (not 100) to force real division.

Starting point

SELECT year, egp_per_usd,
       ROUND((egp_per_usd - LAG(egp_per_usd) OVER (ORDER BY year)) * 100.0
             / LAG(egp_per_usd) OVER (ORDER BY year), 1) AS pct
FROM exchange_rate
ORDER BY year;

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

2016 and 2022–24 stand out as the big devaluation jumps — the percent-change column turns raw rates into a story. (CBE, approximate)

More Economy challenges

Open it in the playground →