Skip to content

In this exercise we will analyze the 'Life Expectancy' dataset using the SQL language.

Notifications You must be signed in to change notification settings

Simovale90/Life_Expectancy

Repository files navigation

SQL Project: Exploring Life Expectancy Data

This SQL project focuses on analyzing a dataset related to life expectancy. The dataset is loaded into BigQuery as a table named "LifeExpectancy," and the project addresses various questions using SQL queries. Key topics covered include GROUP BY, ORDER BY, HAVING, and CASE-WHEN.

Project Overview

The project begins by providing an overview of the dataset's structure to understand the available columns. It then proceeds to answer several questions related to life expectancy and demographic data.

Questions Explored

  1. Average Life Expectancy in Europe: The project calculates the average life expectancy at birth in Europe, utilizing the numeric variable related to the "MetricObserved" dimension.

  2. Lowest Life Expectancy at Birth by Region: It identifies the region with the lowest life expectancy at birth.

  3. Highest Life Expectancy at Birth by Region: The project determines which region has the highest life expectancy at birth.

  4. Highest Life Expectancy after Age 60: The country with the highest life expectancy after the age of 60 is identified.

  5. Pivot Table for Average Life Expectancy: A pivot table is created to display the average life expectancy for different metrics by region. It utilizes GROUP BY and CASE-WHEN to pivot the data.

  6. Gender Gap in Life Expectancy at Birth: The project investigates the gender gap in life expectancy at birth, highlighting countries with the largest gaps and potential scenarios where men live longer than women.

  7. Top 10 Countries with Highest Life Expectancy at Birth for Both Sexes: It identifies the top 10 countries where life expectancy at birth is highest for both sexes.

  8. Life Expectancy at Age 60 by Region and Gender: The project explores life expectancy at age 60 by region and gender.

Conclusion

The SQL project offers insights into various aspects of life expectancy, including regional variations, gender disparities, and more. The provided queries and analyses can be used as a foundation for further exploration and insights into the dataset.

About

In this exercise we will analyze the 'Life Expectancy' dataset using the SQL language.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published