World Life Expectany EDA Project
- Damian Owiredu
- Jun 14
- 1 min read
🎯 Purpose
Analyzed life expectancy improvements and correlated them with GDP and BMI using SQL.
Lets take a look at the data

🛠️ Key Analysis with Code
✅ Life expectancy improvement over time
SELECT country, MIN(`Life expectancy`), MAX(`Life expectancy`),
ROUND(MAX(`Life expectancy`) - MIN(`Life expectancy`), 1) AS Life_Increase_15_Years
FROM world_life_expectancy
GROUP BY Country
HAVING MIN(`Life expectancy`) != 0
AND MAX(`Life expectancy`) != 0
ORDER BY Life_Increase_15_Years DESC;

This query shows which countries have done well in in increasing their life expectancy over the years
✅ Global average life expectancy per year
SELECT Year, ROUND(AVG(`Life expectancy`),2)
FROM world_life_expectancy
WHERE `Life expectancy` != 0
AND `Life expectancy` != 0
GROUP BY Year
ORDER BY Year;

This query is to show what the average life expectancy is for human beings overall over the years.
✅ GDP vs. Life Expectancy Comparison
SELECT
SUM(CASE WHEN GDP >= 1500 THEN 1 ELSE 0 END) High_GDP_Count,
AVG(CASE WHEN GDP >= 1500 THEN `Life expectancy` ELSE NULL END) High_GDP_Life_Expectancy,
SUM(CASE WHEN GDP <= 1500 THEN 1 ELSE 0 END) Low_GDP_Count,
AVG(CASE WHEN GDP <= 1500 THEN `Life expectancy` ELSE NULL END) Low_GDP_Life_Expectany
FROM world_life_expectancy;
This query shows the GDP and Life Expectancy and the correlation between the countries with higher and lower GDPs and their life expectancy

💡 Impact
Revealed patterns in global health and economic progress, supporting further statistical or BI analysis.
Commentaires