Industry Carbon Emissions Analysis – SQL Project (DataCamp Practice)

Summary:


This project was completed as a practice exercise through DataCamp's virtual environment. Using the product_emissions data set, I queried the most recent year's data to calculate the total carbon footprint (PCF) and number of unique companies across industry groups. The analysis used SQL techniques such as GROUP BY, COUNT(DISTINCT), SUM( ), and ORDER BY to identify the industries and countries contributing the most to product-related emissions.

πŸ” Project Overview:


    The dataset contains:
    • 866 product carbon footprints (PCFs)
    • Reported by 145 companies
    • Spanning 30 industry groups
    • Across 28 countries
    • Covering data between 2013–2017

Each PCF quantifies greenhouse gas emissions (in kg COβ‚‚e) associated with a specific product β€” including emissions from upstream supply chains, company operations, and downstream distribution or disposal.

    The goal was to:
    • Identify industries with the highest total emissions
    • Understand how carbon footprints are distributed across companies within sectors
    • Explore country-level contributions to global product-related emissions

Why it matters?
Product-related emissions β€” from food to sneakers to electronics β€” make up over 75% of global emissions, offering a valuable lens to understand where reductions are needed most.



Photo by @frimufilms on Freepik



Since product-related emissions β€” from food to sneakers to electronics β€” contribute to more than 75% of global emissions, this dataset offers an excellent opportunity to explore where these emissions occur and how much each industry contributes.

Table Overview: product_emissions

Column Data Type Description
idVARCHARProduct ID
yearINTReporting year
product_nameVARCHARProduct name
companyVARCHARReporting company
countryVARCHARCountry of incorporation
industry_groupVARCHARIndustry group classification
weight_kgNUMERICProduct weight
carbon_footprint_pcfNUMERICCarbon footprint in kg COβ‚‚e
upstream_percent_total_pcfVARCHAREmissions from supply chain
operations_percent_total_pcfVARCHAREmissions from production
downstream_percent_total_pcfVARCHAREmissions from distribution/use

SQL Queries:


                        -- Total carbon footprint by industry group (most recent year)
                        SELECT industry_group,
                            COUNT(DISTINCT company) AS num_companies,
                            ROUND(SUM(carbon_footprint_pcf), 1) AS total_industry_footprint
                        FROM product_emissions
                        WHERE year = (SELECT MAX(year) FROM product_emissions)
                        GROUP BY industry_group
                        ORDER BY total_industry_footprint DESC;
                    

This SQL query analyzes the product_emissions table to identify which industry groups contributed the most to carbon emissions in the most recent year available. It uses COUNT(DISTINCT company) to count unique companies in each industry group and SUM(carbon_footprint_pcf) to calculate the total industry footprint. The results are grouped byindustry_group, rounded to one decimal place, and sorted in descending order of total emissions.

Carbon Emissions by Industry Group (Most Recent Year)

πŸ“Š Total Carbon Footprint by Industry Group


                        -- Total carbon footprint by country (most recent year)
                        SELECT year,
                            country,
                            COUNT(DISTINCT company) AS num_companies,
                            ROUND(SUM(carbon_footprint_pcf), 1) AS total_country_footprint
                        FROM product_emissions
                        WHERE year = (SELECT MAX(year) FROM product_emissions)
                        GROUP BY year, country
                        ORDER BY total_country_footprint DESC;
                    

This query retrieves the total carbon footprint contributed by each country in the most recent year of available data to identify which countries had the highest overall emissions.

Carbon Emissions by Each Country (Most Recent Year)

Key Finding:

  • Materials and Capital Goods industries had the highest carbon emissions overall.
  • Technology Hardware & Equipment had a large but more evenly distributed footprint across several companies.
  • Even industries with only a few companies contributed significantly to emissions β€” small groups can still have a big environmental impact.
  • Japan, India, and the UK were among the top contributors to product-related emissions.

Thanks to DataCamp for providing the dataset and learning environment for this SQL project.