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.
IBM HR Analytics Employee Attrition Dataset — employee demographics, job role, department, monthly income, overtime status, and attrition flag.
| 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.
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
SELECT GROUP BY COUNT AVG CASE WHEN · Attrition rate computation · Business-focused query interpretation
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
