The Work Gym / Free resources / Free practice datasets
Employee and HR dataset
The HR data of a fictional software company with three departments: 48 workers with start and end dates, exits, FTE and salary, open roles from posting to start date, monthly headcount and an engagement survey. Small on purpose, with the traps real HR exports have, so you can check every number by hand.
Download
- employees.xlsxExcel workbook, one sheet per table (6) · 10 KB
- employees.sqlSQL script for PostgreSQL, MySQL, SQLite and DuckDB · 11 KB
CSV files, one per table
- people.csv48 rows · 4 KB
- recruiting.csv18 rows · 1 KB
- snapshots.csv6 rows · 246 B
- survey.csv30 rows · 611 B
- invitations.csv3 rows · 60 B
- assignments.csv60 rows · 1006 B
The data is fictional and free to use for practice, teaching and portfolio work. A link back is appreciated.
What to practice
The company and its people are invented. The data includes contractors, part-time FTE, voluntary and involuntary exits, duplicate assignment rows and survey answers left blank, the cases that make turnover and headcount numbers go wrong.
- Count headcount and FTE by department, leaving out contractors.
- Work out the voluntary turnover rate for a period from
start_date,end_dateandexit_type. - Measure time to fill (opened to accepted) and time to start for each role in
recruiting. - Find where
assignmentsrepeats a person and decide which row to keep.
Practice with checked exercises
Data dictionary
Table and column names are exactly as they appear in the files.
people48 rows
One row per worker.
- employee_idINTEGER
- Worker number
- departmentVARCHAR
- Engineering, Support or Finance
- worker_typeVARCHAR
- employee or contractor
- start_dateDATE
- Start date
- end_dateDATE
- Last day (empty if still here)
- exit_typeVARCHAR
- voluntary or involuntary (empty if still here)
- fteDOUBLE
- Full-time equivalent: 1 is full time, 0.5 is half time
- annual_salaryDOUBLE
- Annual salary
- band_minDOUBLE
- Salary band minimum
- band_midDOUBLE
- Salary band midpoint
- band_maxDOUBLE
- Salary band maximum
- currencyVARCHAR
- Currency
First rows
| employee_id | department | worker_type | start_date | end_date | exit_type | fte | annual_salary | band_min | band_mid | band_max | currency |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Engineering | employee | 2024-02-01 | 1 | 48011 | 60000 | 80000 | 100000 | USD | ||
| 2 | Engineering | employee | 2024-03-01 | 0.5 | 32011 | 60000 | 80000 | 100000 | USD | ||
| 3 | Engineering | employee | 2024-01-01 | 2026-03-15 | voluntary | 1 | 80011 | 60000 | 80000 | 100000 | USD |
| 4 | Engineering | employee | 2024-05-01 | 2026-05-01 | involuntary | 1 | 90011 | 60000 | 80000 | 100000 | USD |
| 5 | Engineering | employee | 2023-01-01 | 2025-12-31 | voluntary | 1 | 75011 | 60000 | 80000 | 100000 | USD |
recruiting18 rows
Open roles from posting to start date.
- candidate_idINTEGER
- Candidate number
- departmentVARCHAR
- Department
- opened_dateDATE
- Date the role opened
- applied_dateDATE
- First application
- offer_dateDATE
- Offer date
- accepted_dateDATE
- Offer accepted
- start_dateDATE
- Start date
- statusVARCHAR
- filled, open or canceled
First rows
| candidate_id | department | opened_date | applied_date | offer_date | accepted_date | start_date | status |
|---|---|---|---|---|---|---|---|
| 1 | Engineering | 2026-04-01 | 2026-04-02 | 2026-04-18 | 2026-04-20 | 2026-05-15 | filled |
| 2 | Engineering | 2026-04-05 | 2026-04-10 | 2026-04-18 | 2026-04-28 | 2026-05-15 | filled |
| 3 | Engineering | 2026-05-01 | 2026-05-10 | 2026-04-18 | open | ||
| 4 | Engineering | 2026-06-01 | 2026-06-05 | open | |||
| 5 | Engineering | 2026-01-01 | 2026-01-07 | canceled |
snapshots6 rows
Monthly headcount by department.
- departmentVARCHAR
- Department
- monthVARCHAR
- Month (YYYY-MM)
- openingINTEGER
- Headcount at the start of the month
- closingINTEGER
- Headcount at the end of the month
- hiresINTEGER
- Hires
- exitsINTEGER
- Exits
- voluntary_exitsINTEGER
- Voluntary exits
First rows
| department | month | opening | closing | hires | exits | voluntary_exits |
|---|---|---|---|---|---|---|
| Engineering | 2026-05 | 41 | 46 | 8 | 3 | 1 |
| Engineering | 2026-06 | 48 | 54 | 8 | 4 | 2 |
| Support | 2026-05 | 58 | 63 | 9 | 4 | 2 |
| Support | 2026-06 | 65 | 72 | 9 | 5 | 3 |
| Finance | 2026-05 | 75 | 80 | 10 | 5 | 3 |
survey30 rows
Answers to one engagement survey question.
- submission_idINTEGER
- Answer number
- respondent_idINTEGER
- Worker who answered
- departmentVARCHAR
- Department
- item_scoreINTEGER
- Score from 1 to 5 (empty if skipped)
First rows
| submission_id | respondent_id | department | item_score |
|---|---|---|---|
| 1 | 1 | Engineering | 2 |
| 80 | 1 | Engineering | 5 |
| 2 | 2 | Engineering | |
| 3 | 3 | Engineering | 4 |
| 4 | 4 | Engineering | 5 |
invitations3 rows
How many people were invited to the survey.
- departmentVARCHAR
- Department
- invitedINTEGER
- People invited
First rows
| department | invited |
|---|---|
| Engineering | 14 |
| Support | 15 |
| Finance | 16 |
assignments60 rows
Department assignments, with some people listed twice.
- employee_idINTEGER
- Worker
- departmentVARCHAR
- Department
- fteDOUBLE
- FTE on this assignment
First rows
| employee_id | department | fte |
|---|---|---|
| 1 | Engineering | 1 |
| 1 | Engineering | 1 |
| 2 | Engineering | 0.5 |
| 2 | Engineering | 0.5 |
| 3 | Engineering | 1 |
Questions
Why is the dataset so small?
So you can check every answer by hand. It is the data of the HR analytics course, where each table is built around a mistake people make in real reports, such as counting a contractor as headcount.
More datasets
Retail sales dataset
Weekly sales by store and category, promotions and stock checks for a grocery chain.
Healthcare dataset
Patients, encounters, diagnoses, labs, medications, appointments and claims.
SQL sample database: Kestrel online store
Products, customers, orders, employees, suppliers, tickets and web events in 17 tables.
Shipping and logistics dataset
Freight shipments with promised and delivered dates, and their status events.
Customer churn dataset
Subscribers, cancellations, weekly workouts and an A/B test of an annual offer.