This project analyses employee retention, performance, and salary data for NextGen Corp., a growing technology company facing challenges with turnover, performance inconsistency, and salary disparities. Using SQL, the analysis uncovers key workforce patterns and provides data‑driven insights to support strategic HR decision‑making.
- PostgreSQL
The original dataset used for this project is confidential. For privacy reasons, it is not included in this repository. The dataset includes:
- Employee demographics
- Tenure and employment status
- Department and job roles
- Performance scores
- Salary information
- Exit reasons for former employees
The data was cleaned, transformed, and analysed using SQL queries.
- Data cleaning (handling nulls, standardising job titles, removing duplicates)
- Feature engineering (tenure calculation, performance flags, salary bands)
- Exploratory SQL analysis
- Aggregations and departmental comparisons
- Correlation checks (salary vs performance)
- Who are the top 5 longest‑tenured employees?
- What is the turnover rate by department?
- Which employees are at risk of leaving based on performance?
- What are the main reasons employees leave?
- How many employees have left the company?
- How many employees have extreme performance scores (5.0 or below 3.5)?
- Which departments have the most extreme performers?
- What is the average performance score by department?
- What is the total salary expense?
- What is the average salary by job title?
- How many employees earn above $80,000?
- How does salary correlate with performance?
- Marketing (92%) and Engineering (66%) have the highest turnover.
- Long‑tenured employees (10+ years) show strong loyalty, suggesting turnover is concentrated among newer staff.
- Most departures are due to personal reasons (39%) or new job opportunities (25%).
- 28 employees have left the company.
- 47 employees have extreme performance scores (5.0 or below 3.5).
- Engineering and Marketing each have 17 extreme performers.
- Sales has the lowest average performance score (4.00).
- Total salary expense: $4,850,000.
- Sales Representatives earn the highest average salary ($84,285).
- 26 employees earn above $80,000.
- Salary does not strongly correlate with performance.
- Prioritise retention strategies in Marketing and Engineering.
- Strengthen career development and mentorship programmes.
- Align compensation with performance through bonuses and benchmarking.
- Improve work‑life balance with flexible work arrangements.
- Conduct structured exit interviews to identify root causes.
- Implementing these insights could help NextGen Corp:
- Reduce turnover by 10–15% in high‑risk departments
- Improve performance consistency through targeted coaching
- Optimise salary allocation and reduce pay inequities
- Strengthen employee engagement and retention
This SQL project provides a comprehensive analysis of employee retention, performance, and salary data for NextGen Corp.
The findings highlight critical turnover issues in Marketing and Engineering, performance imbalances across departments, and weak alignment between salary and productivity.
By addressing these insights through targeted retention programmes, career development initiatives, and performance‑based compensation, NextGen Corp. can strengthen workforce stability, improve employee satisfaction, and enhance overall organisational efficiency.
This project demonstrates how SQL can be used to uncover actionable HR insights and support data‑driven decision‑making in both healthcare and non‑clinical business contexts.



