-- Using INNER JOING to join multiple tables
SELECT c.code, name, region, e.year, fertility_rate, unemployment_rate -- Select fields
FROM countries AS c -- From countries (alias as c)
INNER JOIN populations AS p -- Join to populations (as p)
ON c.code = p.country_code -- Match on country code
INNER JOIN economies AS e -- Join to economies (as e)
ON c.code = e.code AND p.year = e.year; -- Match on country code and year