Skip to content
gopsthvPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Layoffs Data Cleaning & Exploratory Analysis

Overview

A SQL-based project analyzing a real-world dataset of global layoffs — covering company, industry, country, and funding-stage details — to uncover patterns in workforce reductions over time.

Objective

To clean a messy, duplicate-laden real-world dataset into an analysis-ready form, then explore it to answer:

  • Which industries and countries saw the sharpest layoffs?
  • How did layoffs trend month-over-month and year-over-year?
  • Which companies and funding stages were hit hardest?

Tools Used

  • MySQL — data cleaning, transformation, and analysis
  • SQL techniques: CTEs, window functions, aggregations, rolling totals, ranking functions

Approach

  1. Data Cleaning (data cleaning.sql)

    • Identified and removed duplicate records using window functions (ROW_NUMBER() partitioned over key columns)
    • Standardized inconsistent text fields (company names, industry labels, country names)
    • Handled NULL and blank values, converting date fields to proper DATE types
    • Removed unnecessary columns after cleaning
  2. Exploratory Data Analysis (EDA.sql)

    • Identified companies and industries with the highest total layoffs
    • Used rolling totals (via window functions) to track cumulative layoffs by month
    • Ranked top companies per year using DENSE_RANK()
    • Compared layoffs across funding stages to see whether well-funded companies were more or less affected

Key Focus Areas

  • Duplicate detection and data standardization on a messy real-world dataset
  • Time-series analysis using rolling/cumulative aggregations in pure SQL
  • Ranking and cohort-style comparisons across categorical dimensions (industry, country, funding stage)

Files

  • data cleaning.sql — full cleaning pipeline
  • EDA.sql — exploratory analysis queries
  • layoffs.csv — source dataset

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors