Giter VIP home page Giter VIP logo

subcontinent-covid-death-exploration-sql's Introduction

Welcome to Subcontinet Countries Covid19 Deaths Analysis using SQL

windows made-with-t-sql windows

Exploration and Analysis of the data of confirmed deaths in the subcontinet countries using data provided by Our World in Data using T-SQL and MS SQL Server.
Explore the docs »

View Demo · Report Bug · View Queries


Table of Contents


Overview

The project is mainly about showcasing the data exploration, manipulation and analytical capabilities using SQL. Following SQL skills are used for writing queries for the exploration and analysis of provided COVID19 dataset specifically for Subcontinent countries.

SQL Skills

Joins | CTE's | Temp Tables | Windows Functions | Aggregate Functions | Creating Views | STORED PROCEDURES | TYPE CASTING

Dataset

The data used in this project is publically available at this link and can be downloaded in csv format.

The list of countries included in the analysis is given below:

  1. India
  2. Bhutan
  3. Maldives
  4. Sri Lanka
  5. Nepal
  6. Bangladesh
  7. Pakistan

Get Started

To get the database on your system and test and run the queries, you will need to have SQL Server and SSMS installed on your system. Then you can follow these steps:

  • Import the Excel files in the Excel Data folder into the SSMS using the process mentioned here
  • Open the Subcontinent Covid19 Analysis Queries.sql file in SSMS and run the queries in the given sequence.

Tech Stack

  • Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64)
  • SQL Server Management Studio v18.12.1

Insights

Max Death Percentage for each Subcontinent Country

Result

Query

SELECT location as 'Location',MAX(total_cases) as 'TotalCases', MAX(total_deaths) as 'TotalDeaths', MAX(ROUND(((total_deaths/total_cases) * 100),2)) as 'MaxDeathPercentage'
FROM CovidDeaths
WHERE location IN ('India', 'Pakistan', 'Bhutan','Maldives','Sri Lanka','Nepal','Bangladesh')
GROUP BY location
ORDER BY 4 DESC;
Max Cases/Infection Ratio for each Subcontinent Country

Result

Query

SELECT location as 'Location', MAX(total_cases) as 'TotalCases', Max(population) as 'TotalPopulation' ,MAX(ROUND(((total_cases/population) * 100),2)) as 'MaxPercentPopulationInfected'
FROM CovidDeaths
WHERE location IN ('India', 'Pakistan', 'Bhutan','Maldives','Sri Lanka','Nepal','Bangladesh')
GROUP BY location
ORDER BY 4 DESC;
Comparison Death Ratio Subcontinent vs Rest of Asia

Result

Query

SELECT SUM(TotalCases) as 'TotalCases', SUM(TotalDeaths) as 'TotalDeaths', ROUND(((SUM(TotalDeaths))/SUM(TotalCases))*100,2) as 'DeathPercentageSubContCountries'
FROM (
SELECT MAX(total_cases) AS 'TotalCases', MAX(total_deaths) AS 'TotalDeaths' 
FROM CovidDeaths 
WHERE location IN ('India', 'Pakistan', 'Bhutan','Maldives','Sri Lanka','Nepal','Bangladesh')
GROUP BY location) x;
SELECT SUM(TotalCases) as 'TotalCases', SUM(TotalDeaths) as 'TotalDeaths', ROUND(((SUM(TotalDeaths))/SUM(TotalCases))*100,2) as 'DeathPercentageAsia'
FROM (
SELECT MAX(total_cases) AS 'TotalCases', MAX(total_deaths) AS 'TotalDeaths' 
FROM CovidDeaths 
WHERE continent = 'Asia' AND location NOT IN ('India', 'Pakistan', 'Bhutan','Maldives','Sri Lanka','Nepal','Bangladesh')
GROUP BY location) x;

Project Structure

Subcontinent-Covid-Death-Exploration-Sql
├── Data Files
│   ├── CovidDeaths.xlsx
│   └── CovidVaccinations.xlsx
├── README.md
└── Subcontinent Covid19 Analysis Queries.sql

Contribution Guidelines

Thanks for your interest in my project. Have a great tip or optimizations that you want to add? Follow the steps:

  • Fork the repository and create your branch from main.
  • Issue that pull request!
  • Always add a README and/or requirements.txt to your added code.

Back To The Top


Feedback

Issues with template? Found a bug? Have a great idea for an addition? Feel free to file an issue.

Back To The Top


Author Info

Back To The Top

Enjoy!

subcontinent-covid-death-exploration-sql's People

Contributors

yousaf530 avatar yousaff2022skipq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.