HR Analytics & Workforce Intelligence is an end-to-end SQL Business Intelligence project designed to analyze employee performance, attendance, compensation, promotions, and workforce trends.
The project simulates a real-world HR database environment using Python-generated datasets and performs advanced workforce analytics using MySQL.
This project demonstrates practical SQL skills including Joins, CTEs, Aggregate Functions, Window Functions, Ranking Functions, and Business Intelligence reporting.
- Analyze workforce distribution across departments and cities
- Evaluate employee attendance and performance trends
- Compare salary structures across departments
- Measure promotion rates and promotion patterns
- Identify high-potential employees for future leadership roles
- Build business-focused HR insights using SQL
The dataset was generated using Python and Faker to simulate a realistic HR environment.
| Table | Records |
|---|---|
| Departments | 20 |
| Employees | 1,000 |
| Attendance Records | 12,000 |
| Performance Reviews | 1,000 |
| Salary History | 1,000 |
| Promotions | 1,000 |
- department_id
- department_name
- employee_id
- employee_name
- gender
- city
- department_id
- hire_date
- employee_id
- year
- month
- attendance_percent
- employee_id
- review_year
- rating
- employee_id
- salary_year
- salary
- employee_id
- promotion_year
- promoted
- INNER JOIN
- GROUP BY
- ORDER BY
- Aggregate Functions
- Common Table Expressions (CTEs)
- Window Functions
- ROW_NUMBER()
- DENSE_RANK()
- Ranking Analysis
- Workforce Analysis
- Salary Analytics
- Performance Analytics
- Promotion Analytics
- Employee Segmentation
- Total Employees
- Employees by Department
- Employees by City
- Average Attendance
- Top Consistent Employees
- Department-wise Attendance
- Average Performance Rating
- Top Performers
- Department Performance Ranking
- Average Salary
- Salary by Department
- Highest Paid Employees
- Salary Ranking
- Promotion Rate
- Promotions by Department
- Top Earner in Each Department
- Employee Salary Ranking
- High-Potential Employee Identification
- Average Attendance: 84.83%
- Customer Support Department recorded the highest attendance performance.
- Average Employee Rating: 3.53 / 5
- IT Department achieved the highest average performance rating.
- Finance Department recorded the highest average salary.
- Multiple departments showed strong compensation competitiveness.
- Overall Promotion Rate: 50.80%
- Admin and Training departments recorded the highest promotion counts.
Employees identified with:
- Attendance above 90%
- Performance Rating above 4.5
- No Promotion received
These employees represent strong candidates for future leadership and retention programs.
HR-Analytics-Workforce-Intelligence
│
├── datasets
│ ├── departments.csv
│ ├── employees.csv
│ ├── attendance.csv
│ ├── performance_reviews.csv
│ ├── salary_history.csv
│ └── promotions.csv
│
├── sql_queries
│ ├── database_setup.sql
│ ├── workforce_analytics.sql
│ ├── attendance_analytics.sql
│ ├── performance_analytics.sql
│ ├── salary_analytics.sql
│ ├── promotion_analytics.sql
│ └── advanced_workforce_intelligence.sql
│
├── dataset_generation
│ └── HR_Analytics_Dataset_Generation.ipynb
│
└── README.md
- Python
- Pandas
- Faker
- MySQL
- SQL
- Jupyter Notebook
- Git
- GitHub
Through this project I gained hands-on experience in:
- Designing relational databases
- Generating realistic datasets using Python
- Writing business-focused SQL queries
- Using Window Functions for advanced analytics
- Building workforce intelligence reports
- Translating raw data into actionable business insights
Saurav18K.
Aspiring Data Analyst focused on SQL, Python, Data Analytics, and Business Intelligence.