Skip to content

joyceleehy/HR-SQL-Attrition-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HR Employee Attrition Analysis | SQL + Interactive Dashboard

SQL HTML GitHub Pages Status

Employee attrition costs companies more than just headcount — it drains productivity, drives up hiring costs, and erodes institutional knowledge. This project uses SQL to find out who is leaving, which departments are bleeding talent, and why.


Live Dashboard

👉 View Interactive Dashboard

HR Employee Attrition Dashboard


Dataset

IBM HR Analytics Employee Attrition Dataset — employee demographics, job role, department, monthly income, overtime status, and attrition flag.


Key Findings

Question Finding
Overall attrition rate 16.12%
Highest attrition department Sales — 20.63%
Overtime vs non-overtime attrition 30.53% vs 10.44%
Highest attrition job role Sales Representative — 39.76%
Low-income group attrition 28.61%

Attrition is most strongly associated with overtime workload, low compensation, and Sales-specific role pressure — pointing to workload balance and compensation structure as the primary levers for retention.


How It Was Built

IBM Dataset (CSV)
      ↓
SQLite — imported via DB Browser for SQLite
      ↓
SQL queries — attrition rate by dept, role, income band, overtime
      ↓
HTML/CSS — interactive dashboard built from query outputs
      ↓
GitHub Pages — deployed publicly

SQL Skills Demonstrated

SELECT GROUP BY COUNT AVG CASE WHEN · Attrition rate computation · Business-focused query interpretation


Project Structure

data/                  Raw dataset (CSV)
queries/               SQL scripts
hr_attrition.db        SQLite database
insights.md            Full analysis write-up
dashboard.html         Interactive HTML dashboard
dashboard-preview.png  Dashboard screenshot

📎 LinkedIn · More Projects

About

HR employee attrition analysis using SQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages