shubhamdahiya677 / Earthscape

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deforestation--Exploration (SQL)

In this project, I do research in 3 different parts based on the data provided.

  1. Global Situation ( first I create the view that helps navigate data, I find the total forest area, and total land area each country has and I compare them with 26 years during how they grow in the world)
  2. Regional Outlook ( I check the current percentage area and past forest area percentage and make a table for the top region)
  3. Country-Level Detail ( I look for the top 5 country that has the highest growth in forest and forest percent devied on Quartile group)

In this all the different parts, they provided questions and I find answers using SQL postgre.(PDF file attached)

Step > 1 Create VIEW for data

image

create view create the temporary table in SQL that help us to find the infomation image

Part > 1 Global Situation

In this part i have 5 questions and i need find answer form database.

Q.1) What was the total forest area (in sq km) of the world in 1990? Please keep in mind that you can use the country record denoted as “World" in the region table.

image

Q.2) What was the total forest area (in sq km) of the world in 2016? Please keep in mind that you can use the country record in the table is denoted as “World.”

image

Q.3) What was the change (in sq km) in the forest area of the world from 1990 to 2016?

image image

Q.4) What was the percent change in forest area of the world between 1990 and 2016?

image image

Q.5) If you compare the amount of forest area lost between 1990 and 2016, to which country's total area in 2016 is it closest to?

image image

Part > 2 Regional Outlook

In Regional outlook I have 3 questions to find answer form given data.

Q.1) What was the percent forest of the entire world in 2016? Which region had the HIGHEST percent forest in 2016, and which had the LOWEST, to 2 decimal places?

image

Q.2) What was the percent forest of the entire world in 1990? Which region had the HIGHEST percent forest in 1990, and which had the LOWEST, to 2 decimal places?

image

Q.3) Based on the table you created, which regions of the world DECREASED in forest area from 1990 to 2016?

image image

Part > 3 Country-Level Detail

In this section I am working on 5 Questions to find answer form tables.

Q.1) Which 5 countries saw the largest amount decrease in forest area from 1990 to 2016? What was the difference in forest area for each?

image

image

Q.2) Which 5 countries saw the largest percent decrease in forest area from 1990 to 2016? What was the percent change to 2 decimal places for each?

image image

Q.3) If countries were grouped by percent forestation in quartiles, which group had the most countries in it in 2016?

image image

Q.4) List all of the countries that were in the 4th quartile (percent forest > 75%) in 2016?

image image

Q.5) How many countries had a percent forestation higher than the United States in 2016?

image

image

About