Employee Attrition Prediction
This dataset provides comprehensive historical HR records, including employee demographics, job details, compensation, satisfaction metrics, and attrition status. It is ideal for building predictive models to forecast employee turnover and for analyzing factors influencing retention. The rich feature set supports advanced HR analytics, workforce planning, and targeted retention strategies.
Sample rows
preview · 8 of 150 rows · all 36 columns| employee_idstring | marital_statusstring | num_dependentsinteger | is_activeboolean | genderstring | first_namestring | last_namestring | date_of_birthdate | hire_datedate | termination_datedate | departmentstring | job_rolestring | manager_idstring | education_levelstring | salaryfloat | bonusfloat | job_levelinteger | years_at_companyfloat | years_in_current_rolefloat | years_since_last_promotionfloat | years_with_current_managerfloat | performance_ratinginteger | overtimeboolean | work_life_balanceinteger | job_satisfactioninteger | environment_satisfactioninteger | training_times_last_yearinteger | num_companies_workedinteger | distance_from_homefloat | business_travelstring | attritionboolean | address_streetstring | address_citystring | address_statestring | address_postal_codestring | address_countrystring |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EMP-0001 | Single | 0 | true | Female | Sophia | Martinez | 1989-06-08 | 2015-08-15 | blank | IT | Software Engineer | EMP-0003 | Bachelor | 87000 | 5000 | 2 | 8.8 | 3.5 | 2.2 | 2 | 4 | true | 2 | 3 | 3 | 2 | 1 | 4.1 | Travel_Rarely | false | 782 Oakridge Dr | Boston | MA | 02118 | USA |
| EMP-0002 | Married | 2 | true | Male | Jackson | Lee | 1972-04-21 | 2001-09-01 | blank | Finance | Finance Manager | blank | Master | 127000 | 15000 | 4 | 22.2 | 10.4 | 2.7 | 6.8 | 5 | false | 3 | 4 | 4 | 1 | 2 | 8.5 | Travel_Rarely | false | 390 Pinecrest Ave | Nashville | TN | 37211 | USA |
| EMP-0003 | Married | 3 | true | Female | Ava | Patel | 1981-01-13 | 2010-04-10 | blank | IT | IT Manager | blank | Master | 112000 | 12000 | 4 | 13.9 | 7.6 | 1.9 | 5.2 | 4 | false | 3 | 4 | 4 | 1 | 2 | 12.7 | Travel_Rarely | false | 1507 Willow St | Austin | TX | 78702 | USA |
| EMP-0004 | Single | 0 | false | Male | Mason | Young | 1996-10-07 | 2021-07-12 | 2023-06-18 | Sales | Sales Representative | EMP-0007 | Bachelor | 49000 | 1200 | 1 | 1.9 | 1.9 | 1.9 | 1.7 | 3 | true | 2 | 2 | 2 | 3 | 0 | 1.8 | Travel_Frequently | true | 89 Harbor Dr | Tampa | FL | 33602 | USA |
| EMP-0005 | Single | 0 | true | Female | Isabella | Nguyen | 1992-03-19 | 2017-11-03 | blank | Engineering | Quality Analyst | EMP-0010 | Bachelor | 79000 | 4000 | 2 | 5.6 | 3.6 | 2.8 | 2.1 | 4 | true | 3 | 3 | 3 | 2 | 1 | 7.2 | Travel_Rarely | false | 512 Summit Pl | Denver | CO | 80203 | USA |
| EMP-0006 | Married | 2 | true | Male | Aiden | Robinson | 1986-12-14 | 2014-02-24 | blank | IT | Systems Administrator | EMP-0003 | Bachelor | 92000 | 6000 | 3 | 9.9 | 5.9 | 3.1 | 3 | 3 | true | 2 | 3 | 2 | 1 | 2 | 2.2 | Travel_Rarely | false | 671 Birchwood Ave | Chicago | IL | 60616 | USA |
| EMP-0007 | Married | 3 | true | Male | Logan | White | 1982-07-02 | 2009-10-12 | blank | Sales | Sales Manager | blank | Bachelor | 117000 | 17500 | 4 | 14.1 | 7.2 | 1.2 | 4 | 4 | false | 3 | 4 | 3 | 1 | 2 | 12.5 | Travel_Frequently | false | 213 Cedar Ct | Charlotte | NC | 28202 | USA |
| EMP-0008 | Married | 2 | true | Male | Lucas | Perez | 1978-09-21 | 2012-01-25 | blank | Operations | Operations Analyst | EMP-0012 | Bachelor | 84000 | 3500 | 3 | 11.2 | 6.8 | 3.6 | 3.2 | 4 | false | 3 | 3 | 3 | 2 | 2 | 7.9 | Non-Travel | false | 490 King St | Seattle | WA | 98101 | USA |
| EMP-0009 | Single | 0 | true | Female | Mia | Carter | 1998-02-23 | 2022-03-15 | blank | Marketing | Marketing Associate | EMP-0015 | Bachelor | 54000 | 1500 | 1 | 1.8 | 1.8 | 1.8 | 1.8 | 3 | false | 3 | 3 | 2 | 2 | 0 | 3.5 | Travel_Rarely | false | 347 Main St | Boston | MA | 02116 | USA |
| EMP-0010 | Married | 2 | true | Female | Ella | Thomas | 1975-11-11 | 2005-06-13 | blank | Engineering | Engineering Manager | blank | Master | 153000 | 22000 | 5 | 18.7 | 8.2 | 2.5 | 6 | 5 | false | 4 | 4 | 4 | 1 | 2 | 18.3 | Travel_Frequently | false | 659 Cypress Rd | Austin | TX | 78701 | USA |
| EMP-0011 | Single | 0 | true | Male | Liam | Johnson | 1994-07-29 | 2020-09-28 | blank | Development | Junior Developer | EMP-0017 | Associate | 37000 | 0 | 1 | 3.1 | 3.1 | 3.1 | 2.5 | 3 | true | 2 | 2 | 2 | 4 | 1 | 0.7 | Non-Travel | false | 889 Walnut St | Raleigh | NC | 27601 | USA |
| EMP-0012 | Married | 2 | true | Male | Benjamin | Wright | 1984-12-18 | 2011-10-04 | blank | Operations | Operations Manager | blank | Master | 118500 | 9000 | 4 | 11.7 | 5.4 | 2.1 | 3 | 4 | false | 3 | 3 | 3 | 1 | 2 | 9.4 | Travel_Rarely | false | 231 Lakeview Dr | Orlando | FL | 32801 | USA |
| EMP-0013 | Single | 0 | false | Female | Zoe | Murphy | 1997-03-10 | 2021-02-20 | 2022-12-07 | HR | HR Coordinator | EMP-0018 | Bachelor | 45000 | 0 | 1 | 1.8 | 1.8 | 1.8 | 1.2 | 2 | false | 2 | 2 | 2 | 2 | 0 | 4.6 | Non-Travel | true | 322 Summer St | Phoenix | AZ | 85004 | USA |
| EMP-0014 | Married | 1 | true | Male | Ethan | Stewart | 1988-12-28 | 2016-06-01 | blank | Development | Software Developer | EMP-0017 | Bachelor | 85000 | 3000 | 2 | 7.1 | 4.4 | 3.2 | 2.1 | 3 | true | 2 | 3 | 3 | 3 | 1 | 6.3 | Travel_Rarely | false | 763 Aspen Ct | Denver | CO | 80211 | USA |
| EMP-0015 | Married | 2 | true | Female | Olivia | Bennett | 1985-05-24 | 2018-01-26 | blank | Marketing | Marketing Manager | blank | Master | 101000 | 11000 | 3 | 5.4 | 3.2 | 1.7 | 2.5 | 4 | false | 3 | 4 | 4 | 1 | 2 | 13.3 | Travel_Rarely | false | 315 Spruce St | San Francisco | CA | 94103 | USA |
| EMP-0016 | Single | 0 | false | Male | Matthew | Ramirez | 1993-11-17 | 2019-10-21 | 2023-04-01 | IT | Help Desk Technician | EMP-0003 | Associate | 43000 | 0 | 1 | 3.5 | 3.5 | 3.5 | 2.5 | 2 | true | 2 | 2 | 2 | 3 | 1 | 1.2 | Non-Travel | true | 201 Ridge Ave | Dallas | TX | 75201 | USA |
| EMP-0017 | Married | 2 | true | Male | Alexander | King | 1980-08-04 | 2008-02-12 | blank | Development | Development Manager | blank | Master | 118000 | 11500 | 4 | 15.1 | 5.7 | 2 | 3.9 | 4 | false | 3 | 4 | 4 | 1 | 2 | 9.8 | Travel_Rarely | false | 402 Highland St | Austin | TX | 78705 | USA |
| EMP-0018 | Married | 2 | true | Female | Charlotte | Mitchell | 1973-02-02 | 2002-07-17 | blank | HR | HR Manager | blank | Master | 113500 | 9000 | 4 | 21.7 | 7.8 | 2.5 | 6.7 | 5 | false | 4 | 4 | 4 | 1 | 2 | 6.2 | Non-Travel | false | 121 Elm St | Madison | WI | 53703 | USA |
| EMP-0019 | Single | 0 | false | Other | Harper | Kim | 1995-09-14 | 2020-01-16 | 2022-07-22 | Engineering | Test Engineer | EMP-0010 | Bachelor | 69000 | 3000 | 2 | 2.5 | 2.5 | 2.5 | 2 | 3 | true | 2 | 2 | 2 | 2 | 1 | 2.7 | Travel_Rarely | true | 801 Grove St | Boulder | CO | 80302 | USA |
| EMP-0020 | Married | 1 | true | Female | Grace | Hernandez | 1987-06-30 | 2016-05-18 | blank | Finance | Accountant | EMP-0002 | Bachelor | 81000 | 3500 | 2 | 7.8 | 4.2 | 2.3 | 3.5 | 4 | false | 3 | 3 | 3 | 2 | 1 | 5.7 | Travel_Rarely | false | 979 Ridge St | Boston | MA | 02115 | USA |
What the 150 rows show
from the 150-row sampleSingle (marital status) stands out: mean num_
- 82%is_
active = true - 0median num_
dependents - 3business travels
- 5education levels
- 9departments
- 29address states
Median 0, from 0 to 3.
- string 15
- integer 8
- float 7
- date 3
- boolean 3
Columns
36 columns in four groups| column | type | description | example |
|---|---|---|---|
| Text 15 columns | |||
employee_id | string | Unique identifier for each employeeunique | EMP-0001 |
first_name | string | Employee's first name | Sophia |
last_name | string | Employee's last name | Martinez |
gender | string | Employee's genderMale · Female · Other · Prefer not to say · optional | Female |
department | string | Department where the employee works9 departments | IT |
job_role | string | Employee's job title or role | Software Engineer |
manager_id | string | Employee ID of the manageroptional | EMP-0003 |
education_level | string | Highest education level attained6 values · optional | Bachelor |
marital_status | string | Employee's marital statusSingle · Married · Divorced · Widowed · Other · optional | Single |
business_travel | string | Frequency of business travelNon-Travel · Travel_Rarely · Travel_Frequently · optional | Travel_Rarely |
address_street | string | Employee's residential street addressoptional | 782 Oakridge Dr |
address_city | string | Employee's residential cityoptional | Boston |
address_state | string | Employee's residential state or provinceoptional | MA |
address_postal_code | string | Employee's residential postal codeoptional | 02118 |
address_country | string | Employee's residential countryoptional | USA |
| Numbers 15 columns | |||
num_dependents | integer | Number of dependents the employee has0 or more · optional | 0 |
salary | float | Current annual salary of the employee in USD0 or more | 87000 |
bonus | float | Annual bonus received by the employee in USD0 or more · optional | 5000 |
job_level | integer | Job level or grade within the organization1 or more · optional | 2 |
years_at_company | float | Total number of years the employee has worked at the company0 or more | 8.8 |
years_in_current_role | float | Number of years the employee has been in their current role0 or more · optional | 3.5 |
years_since_last_promotion | float | Years since the employee's last promotion0 or more · optional | 2.2 |
years_with_current_manager | float | Years the employee has worked with their current manager0 or more · optional | 2 |
performance_rating | integer | Most recent performance rating (e.g., 1-5 scale)1 to 5 · optional | 4 |
work_life_balance | integer | Employee's work-life balance rating (e.g., 1-4 scale)1 to 4 · optional | 2 |
job_satisfaction | integer | Employee's job satisfaction rating (e.g., 1-4 scale)1 to 4 · optional | 3 |
environment_satisfaction | integer | Employee's satisfaction with work environment (e.g., 1-4 scale)1 to 4 · optional | 3 |
training_times_last_year | integer | Number of training sessions attended in the last year0 or more · optional | 2 |
num_companies_worked | integer | Number of companies the employee has previously worked for0 or more · optional | 1 |
distance_from_home | float | Distance from employee's home to workplace in miles0 or more · optional | 4.1 |
| Dates and times 3 columns | |||
date_of_birth | date | Employee's date of birthoptional | 1989-06-08 |
hire_date | date | Date the employee was hired | 2015-08-15 |
termination_date | date | Date the employee left the organization, null if still employedoptional | 2023-06-18 |
| True or false 3 columns | |||
is_active | boolean | Indicates if the employee is currently employed | true |
overtime | boolean | Indicates if the employee regularly works overtimeoptional | true |
attrition | boolean | Indicates if the employee has left the company (target variable) | false |
15 SQL practice questions for the Employee Attrition Prediction
Written for this data and checked against it: 12 SQL and 3 Power BI exercises from beginner to advanced. Try the first three free; the practice kit has all 15, a starter .sql file and an answer key with every expected result.
Active employees in Sales
Return employee_id, first_name, last_name and salary for every employee in the Sales department who is still active (is_active = 1). Order the results by salary from highest to lowest, then by employee_id ascending.
Tables: employee_attrition_prediction · your result: 4 columns, 8 rowsDistinct education levels
Return each distinct education_level found among employees, excluding rows where education_level is null. Order the values alphabetically.
Tables: employee_attrition_prediction · your result: 1 columns, 5 rowsHeadcount by department
Return department and headcount (the number of employees in each department), excluding rows where department is null. Order by headcount descending, then by department ascending.
Tables: employee_attrition_prediction · your result: 2 columns, 9 rows
- 04Average salary by job levelBeginner
- 05Total bonus by department tablePower BI
- 06Departments with high attritionIntermediate
- 07Salary bands and satisfactionIntermediate
- 08Employees paid above company averageIntermediate
- 09Hires per year since 2018Intermediate
- 10Attrition rate by overtimePower BI
- 11Top two salaries per departmentAdvanced
- 12Share of total payroll by departmentAdvanced
- 13Hire gap to previous hireAdvanced
- 14Running payroll by hire year cohortAdvanced
- 15Salary outliers within departmentPower BI
Get the practice kit: the full dataset, all 15 exercises, a starter .sql and the answer key. One-time $3.99.
Get the practice kit · $3.99Use it for
A human resources dashboard
The is_
active rate, num_ dependents by marital_ status and a breakdown of gender. Excel, Power BI or Tableau. Why do the 77 Single rows have a mean num_
dependents of 0.0? A root-cause class exercise
Hand out the rows and one question. The answer is in the data, not in the brief.
- Employees150EMP-00010SingleEMP-00022MarriedEMP-00040Single
A software demo
Believable employees with first_
name, last_ name and gender to fill a screen in front of a buyer.
blueprint · employee-attrition-prediction
Behind this dataset
Same schema. As many rows as you need.
These 150 rows came out of a blueprint — 36 columns with generation rules behind each one. Open it in Data Factory to retune a column, add your own, wire in foreign keys, and run it at the size you actually need.
- Employees with tenure <6 months excluded
- Exit interviews required for all departures
- Resignation reasons standardized
- Active employees must have last appraisal date
1 credit per row. Preview 20 rows free. Buy rows for the full run.
- Exports
- CSV, JSON, JSONL, Parquet, SQL, Excel, TSV, XML
- Licence
- yours to use, including commercially
- API slug
- employee-attrition-prediction