This project explores global life expectancy trends using SQL. It is based on the Analyst Builder: MySQL for Data Analytics course and highlights data cleaning, exploration, and analysis using real-world indicators.
- CSV File:
WorldLifeExpectancy.csv - JSON File:
WorldLifeExpectancy.json - The dataset includes life expectancy, GDP, development status, BMI, and adult mortality across multiple countries over several years.
The cleaning and transformation steps were completed using SQL and include:
- Removing duplicates with
CONCAT(Country, Year) - Handling missing values in
Status,Life expectancy, andBMI - Filtering anomalies such as zero or negative values
- Ensuring data types and constraints for analysis
Key queries were performed in the script:
World_Life_Expectacy_Script.sql
Insights include:
- Trends in life expectancy by country and development status
- Correlations with GDP, BMI, and adult mortality
- Outlier detection and year-over-year improvements
- Cleaned and analyzed results exported as:
World_life_expectancy_output.csv
This file includes top countries by life expectancy, yearly trends, and categorical summaries.
βββ data/ β βββ WorldLifeExpectancy.csv β βββ WorldLifeExpectancy.json
βββ scripts/ β βββ World_Life_Expectacy_Script.sql
βββ output/ β βββ World_life_expectancy_output.csv βββ README.md
- MySQL / SQL Workbench
- Git & GitHub
- Data from Analyst Builder course
- Life expectancy rises with economic development and healthcare investment.
- Developing countries show greater volatility in trends.
- Adult mortality and BMI are strong life expectancy indicators.
Project created for educational and portfolio purposes.
Feel free to fork or star β the repo if you find it useful!