World Life Expectancy
A SQL cleaning and exploration project examining life expectancy, GDP, development status, BMI, and adult mortality worldwide.

The question
Prepare a multi-year global health dataset and investigate the economic and demographic factors associated with life expectancy.
The approach
I removed duplicate country-year rows, restored missing development status, interpolated incomplete life-expectancy values using adjacent years, and created trend, comparison, and rolling calculations.
The outcome
The finished analysis measures fifteen-year changes, compares GDP and development groups, and connects life expectancy with economic and health indicators.
Analysis questions
What the work needed to answer.
- 01
Which country-year records are duplicated or incomplete?
- 02
How much did life expectancy change over fifteen years by country?
- 03
How do GDP and development status relate to life expectancy?
- 04
What do BMI and rolling adult mortality reveal?
Method
From raw data to a useful answer.
Deduplicate
Partitioned by country and year to isolate repeated records.
Restore dimensions
Used self joins to fill missing developed or developing status from other records for the same country.
Interpolate values
Estimated missing life expectancy from the preceding and following years where both were available.
Analyze trends
Calculated country change, yearly averages, GDP groups, development comparisons, BMI relationships, and rolling adult mortality.
Results
What the analysis revealed.
Cleaning protects every comparison
Duplicate country-year rows and missing status values can materially distort yearly and development-group averages.
Adjacent years can repair gaps
For isolated missing life-expectancy values, neighboring years provide a transparent interpolation method.
Economic context is visible
A high-versus-low GDP comparison makes the relationship between resources and life expectancy easier to interpret.
Windows reveal accumulation
Rolling adult mortality shows how mortality builds over time within a country rather than as disconnected annual values.