Average life expectancy (years)
World Life Expectancy — SQL Analysis
- Problem
- How has life expectancy changed across 193 countries between 2007 and 2022, and which factors is it linked to?
- Approach
- Data cleaning with window functions and self joins, followed by exploratory queries using CTEs,
LAGandCASE. - Outcome
- The global average rose from 66.8 to 71.6 years, with a dip in 2020. Developed countries averaged 79.2 years against 66.8 for developing countries.