Data source : Link

The Covid-19 pandemic has significantly impacted the world, leading to significant changes in our daily lives. Understanding the scope of the pandemic and making informed decisions requires reliable data on Covid-19 cases, deaths, and vaccinations. However, with vast amounts of data available, it can be challenging to make sense of it all.

In the exploration project, I used MS sql server to summarize the findings and give short presentation about the covid-19 data and numbers until the first week of January 2023.

A sample of the data

covid.bmp

How it works:

Data was downloaded from the link above, and I split the table into two; one was named covid vaccination and the other covid death to simplify the table.

I imported excel files into SQL and I wrote querries in the file below to obtain readable informaiton about covid.

1. GLOBAL NUMBERS:

I wrote a query to get total number globally

SELECT 
  SUM(new_cases) AS totalcases, 
  SUM(new_deaths) AS totaldeaths, 
  CAST( SUM(new_deaths)/SUM(New_Cases)*100  AS decimal(10,2)) AS DeathPercentage
FROM Coviddeathes
WHERE continent is not NULL

Answer from running the code:

global.bmp

2.Total cases per year and continent:

I wrote the query to pivot data to get total cases per year and a second query of total cases per continent per year.

-- Total Cases PER year
SELECT
  Location, [2020],[2021],[2022],[2023]
FROM(SELECT
       Location, 
       DATENAME(YEAR, date) AS Year, 
       new_cases 
FROM Coviddeathes
WHERE continent is not NULL 
GROUP BY Location, new_cases , DATENAME(YEAR, date) ) AS T
PIVOT (SUM(new_cases) FOR Year IN ([2020],[2021],[2022],[2023])) AS PV

-- Total Cases PER year FOR continent
SELECT 
   continent, [2020],[2021],[2022],[2023]
FROM(SELECT
       continent, 
       DATENAME(YEAR, date) AS Year,
       new_cases 
FROM Coviddeathes
WHERE continent is not NULL
GROUP BY continent, new_cases , DATENAME(YEAR, date) ) AS T
PIVOT (SUM(new_cases) FOR Year IN ([2020],[2021],[2022],[2023])) AS PV

Sample from running the code:

covid2.bmp

3.Total deaths per year and continent:

I wrote the query to pivot data to get total cases per year and second query total cases per continent per year.