Skip to content

farrux05-ai/hr-attrition-analysis

Repository files navigation

👥 HR Attrition Analysis — SQL + Power BI

Business question: What drives employee attrition — and which segments are highest risk?

SQL Power BI Dataset Status


📌 Project Overview

Employee attrition is one of the most costly HR challenges — replacing a single employee can cost 50–200% of their annual salary.

This project analyzes the IBM HR Analytics dataset (1,470 employees) to identify the key drivers of attrition and provide actionable retention recommendations.

Analysis approach: SQL for data extraction & KPI computation → Power BI for interactive dashboards → PDF report for stakeholders.


🔑 Key Findings

Factor Finding
Overall attrition rate ~16% (237 of 1,470 employees)
Highest risk department Sales — highest attrition share
Age group 25–35 most likely to leave
Overtime Employees working overtime: significantly higher attrition
Job satisfaction Low satisfaction (1–2) → 3x higher attrition vs high (3–4)
Years at company Spike at 1 year — early-tenure risk

💡 Recommendations

  1. Target Sales department — investigate workload, compensation, growth path
  2. Reduce overtime dependency — high overtime is a strong attrition predictor
  3. 30/60/90-day onboarding program — address the 1-year tenure spike
  4. Job satisfaction surveys — early detection for low-satisfaction employees
  5. Career path clarity for 25–35 age group — growth opportunities reduce churn

📊 Dashboard (Power BI)

Interactive dashboard covering:

  • Overall attrition rate & trend
  • Attrition by department, age, job role
  • Overtime vs attrition correlation
  • Job satisfaction breakdown

📄 Full analysis: Report HR attrition.pdf


📁 Project Structure

hr-attrition-analysis/
├── hrattrition.sql                      # SQL queries — EDA & KPI analysis
├── HR Analytics Dashboard.pbix          # Power BI dashboard
├── Report HR attrition.pdf              # Full analysis report
├── WA_Fn-UseC_-HR-Employee-Attrition.csv # Source dataset (IBM)
└── README.md

⚙️ How to Run

# 1. Load dataset into PostgreSQL
# Import WA_Fn-UseC_-HR-Employee-Attrition.csv

# 2. Run SQL analysis
psql -U your_user -d your_db -f hrattrition.sql

# 3. Open dashboard
# Open HR Analytics Dashboard.pbix in Power BI Desktop

🛠️ Tech Stack

Tool Purpose
SQL (PostgreSQL) Data extraction, cleaning, KPI queries
Power BI Interactive dashboard
IBM HR Dataset 1,470 employees, 35 features

👤 Author

Farruxbek Valijonov — Analytics Engineer
LinkedIn GitHub

About

"HR attrition analysis: SQL + Power BI — identifying key drivers of employee turnover (IBM dataset)"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors