This project demonstrates SQL skills by analyzing an HR employee dataset using MySQL Workbench. The project covers data cleaning, exploratory data analysis (EDA), and business analysis to generate actionable insights from HR data.
The objective is to simulate real-world HR analytics tasks commonly performed by Data Analysts.
- MySQL Workbench
- SQL
- HR Employee Dataset
- GitHub
The dataset contains employee-related information such as:
- Employee ID
- Employee Name
- Department
- Business Unit
- Job Title
- Gender
- State
- Marital Status
- Employee Status
- Performance Score
- Current Employee Rating
- Supervisor
- Date of Birth (DOB)
- Start Date
- Exit Date
- Pay Zone
- Employee Type
- Employee Classification
The following data cleaning steps were performed:
- Created a copy of the original dataset
- Checked for duplicate Employee IDs
- Verified Employee Status values
- Converted DOB from VARCHAR to DATE
- Converted StartDate from VARCHAR to DATE
- Converted ExitDate from VARCHAR to DATE
- Verified data types before analysis
The project explores:
- Total Employees
- Department Distribution
- Business Unit Distribution
- Gender Distribution
- Employee Status Distribution
- State-wise Employee Distribution
- Marital Status Distribution
This project answers the following business questions:
- What is the average employee rating?
- Who are the top-rated employees?
- Which department has the highest average rating?
- How are employees distributed across performance scores?
- Which employee classifications are most common?
- Which job titles have the largest workforce?
- Which divisions have the highest number of employees?
- What is the distribution of employee types?
- Which supervisors manage the largest teams?
- Which employees exceed performance expectations?
- Which employees need improvement?
- What is the average employee rating by gender?
- Which business units perform the best?
- Which departments have the highest employee turnover?
- How are employees distributed across pay zones?
- Which states employ the most people?
- Which department has the highest average performance rating?
- How do supervisors compare based on average team performance?
- What is the employee age distribution?
- What are the monthly hiring trends?
- Which employees perform below the company average?
- What is the department-wise performance summary?
- How does performance vary across genders?
- What is the average employee tenure?
- SELECT
- WHERE
- GROUP BY
- ORDER BY
- LIMIT
- Aggregate Functions (COUNT, AVG, SUM)
- CASE Statements
- Subqueries
- TIMESTAMPDIFF()
- YEAR()
- MONTH()
- STR_TO_DATE()
- ALTER TABLE
- UPDATE
This analysis groups employees into different age categories to understand workforce demographics.
This analysis shows employee hiring trends across different years and months.
This summary compares employee count, average ratings, active employees, and terminated employees across departments.
- Production has the largest workforce.
- Executive Office, Software Engineering, and Admin Offices have the highest average employee ratings.
- Most employees belong to the 60+ age group.
- Hiring remained consistent across multiple years.
- Employee performance varies across departments and business units.
- Supervisor-level analysis highlights differences in team performance.
- The project provides insights into workforce demographics and organizational structure.
This project demonstrates an end-to-end SQL workflow used in real-world data analytics:
- Data Import
- Data Cleaning
- Exploratory Data Analysis
- Business Analysis
- Insight Generation
The project showcases practical SQL skills for solving business problems using HR data.
HR-Analytics-SQL-Project/
│
├── README.md
├── HR_Analytics_SQL_Project.sql
├── employee_data.csv
│
├── screenshots/
│ ├── Age_Group_Analysis.png
│ ├── Monthly_Hiring_Trend.png
│ └── Department_Performance.png
│
└── LICENSE
Sai Teja
Aspiring Data Analyst
- SQL
- Microsoft Excel
- Power BI (Learning)
- Python (Learning)
Thank you for visiting this project!


