Employee Dataset for HR Analytics and Practice
This ready-made employee dataset provides a sample for HR analytics and data practice. It includes 10,010 rows across three tables, covering employee information, departments, and salaries. A free sample is available, with full downloads costing credits.
At a glance
- 3tables
- 10,010rows
- 15columns
- Jan 2010 – Dec 2023date range
The 3 tables
preview and data dictionary per tableDepartments departments · dimension table · 10 rows
Contains information about company departments.
Preview
| department_iduuid | department_namestring | locationstring |
|---|---|---|
| ec164d08-c9b0-4262-a2cf-4b961803792b | Data Science | San Francisco |
| 51558957-4d0a-4142-a6fc-bbcd51fbb182 | Engineering | San Francisco |
| 0a778a7a-08ba-41a4-8d3b-c4595f6a35f3 | Data Science | San Francisco |
| e66c9bcb-72d3-4e34-81e0-43e67ffe2132 | Data Science | San Francisco |
| ad81469b-de01-4624-a980-c2b1e05012dc | Sales | New York |
| a9bd365f-b2cc-4847-89fd-d35be7e878d6 | Sales | New York |
| 585de48f-14cb-431e-904b-ed30fe5f2ef7 | Sales | Chicago |
| 34d43975-3a91-4b0d-8284-bb9d06875a61 | Human Resources | Boston |
| 9477015b-c015-482d-86b8-bb08c55a4ba1 | Finance | New York |
| 52b7abec-26a7-41e9-b5d4-15e7e90ec80d | Finance | New York |
Data dictionary
| column | type | description | example | null % |
|---|---|---|---|---|
department_ | uuid | Unique identifier for the department.unique | ec164d08-c9b0-4262-a2cf-4b961803792b | 0% |
department_ | string | Name of the department. | Data Science | 0% |
location | string | City where the department is located. | San Francisco | 0% |
Employees employees · table · 5,000 rows
Contains core information for each employee.
Preview
| employee_iduuid | first_namestring | last_namestring | emailstring | hire_datedate | job_titlestring | department_iduuid |
|---|---|---|---|---|---|---|
| 48d98eff-65bc-4052-ae1b-8322c67c9ddc | Scarlett | Moreno | [email protected] | 2015-03-05 | Software Engineer | 585de48f-14cb-431e-904b-ed30fe5f2ef7 |
| 3b1ef902-6ada-4281-a2e7-59cbfdf534d9 | Javier | Medina | [email protected] | 2017-05-29 | Software Engineer | 51558957-4d0a-4142-a6fc-bbcd51fbb182 |
| f88a7c93-03d0-4aab-b3d8-d61c4b5033cb | Sofia | Miller | [email protected] | 2022-09-20 | Software Engineer | 585de48f-14cb-431e-904b-ed30fe5f2ef7 |
| efb6d713-c39a-4e9f-8e53-0cc39b477763 | William | Mendoza | [email protected] | 2023-01-12 | Software Engineer | 51558957-4d0a-4142-a6fc-bbcd51fbb182 |
| cbcb989f-1d77-40a5-a26f-9cf32f114874 | Isabella | Morales | [email protected] | 2023-05-16 | Software Engineer | a9bd365f-b2cc-4847-89fd-d35be7e878d6 |
| c230a9ca-28e3-4e25-84a1-0fd607cf5ef1 | Ethan | Mcdonald | [email protected] | 2020-01-31 | Software Engineer | 9477015b-c015-482d-86b8-bb08c55a4ba1 |
| 90915058-4eba-42bd-b7c0-a1a80c47ac14 | Lucas | Mitchell | [email protected] | 2023-12-20 | Software Engineer | 52b7abec-26a7-41e9-b5d4-15e7e90ec80d |
| c7090834-670b-4f47-9381-fa2659bd5b05 | Abigail | Montoya | [email protected] | 2018-09-11 | Software Engineer | 52b7abec-26a7-41e9-b5d4-15e7e90ec80d |
| c31194cc-d515-4e77-829b-23d5a9b27f84 | Noah | Morgan | [email protected] | 2022-05-23 | Software Engineer | 51558957-4d0a-4142-a6fc-bbcd51fbb182 |
| b347fdd8-6caf-4867-bdb4-786a35c96a73 | Olivia | Myers | [email protected] | 2017-10-12 | Software Engineer | ec164d08-c9b0-4262-a2cf-4b961803792b |
Data dictionary
| column | type | description | example | null % |
|---|---|---|---|---|
employee_ | uuid | Unique identifier for the employee.unique | 48d98eff-65bc-4052-ae1b-8322c67c9ddc | 0% |
first_ | string | First name of the employee. | Scarlett | 0% |
last_ | string | Last name of the employee. | Moreno | 0% |
email | string | Email address of the employee.unique | [email protected] | 0% |
hire_ | date | Date the employee was hired. | 2015-03-05 | 0% |
job_ | string | Job title of the employee. | Software Engineer | 0% |
department_ | uuid | Identifier linking to the departments table. | 585de48f-14cb-431e-904b-ed30fe5f2ef7 | 0% |
Salaries salaries · fact table · 5,000 rows
Contains salary details for employees.
Preview
| salary_iduuid | salarydecimal | start_datedate | end_datedate | employee_iduuid |
|---|---|---|---|---|
| a79cb4f5-d46d-4e4f-8b9f-6ecba22fabec | 99660.56 | 2017-05-29 | blank | 3b1ef902-6ada-4281-a2e7-59cbfdf534d9 |
Data dictionary
| column | type | description | example | null % |
|---|---|---|---|---|
salary_ | uuid | Unique identifier for the salary record.unique | 941600fb-4a71-40fa-b40d-4947079dd5db | 0% |
salary | decimal | Annual salary amount in USD. | 75323.38 | 0% |
start_ | date | Effective start date of the salary. | 2020-07-14 | 0% |
end_ | date | End date of the salary period, null for active employees. | 2021-12-27 | 84.7% |
employee_ | uuid | Identifier linking to the employees table.unique | 2e152720-989e-4903-9cad-4390e133b535 | 0% |
How the tables join
employees.department_id references departments.department_idmany to one: each Employees row points to one Departments rowsalaries.employee_id references employees.employee_idmany to one: each Salaries row points to one Employees row
Questions to answer with it
Write a SQL query to find the average salary for each department, joining the employees and departments tables.
tables: employees, departments, salaries
Using Power BI, create a bar chart showing the number of employees per department. What is the distribution of employees across different departments?
tables: employees, departments
How does salary vary based on job title? Identify the department with the highest average employee age (calculate age from hire_date).
tables: employees, salaries, departments
Create a pivot table in Excel to analyze salary trends by department and job title.
tables: employees, departments, salaries
Starter SQL
run against this data before publishingTable names match the SQLite file and the SQL script.
Average Salary by Department
SELECT d.department_name, AVG(s.salary) AS average_salary
FROM departments d
JOIN employees e ON d.department_id = e.department_id
JOIN salaries s ON e.employee_id = s.employee_id
GROUP BY d.department_name
LIMIT 20;Employee Count per Department
SELECT d.department_name, COUNT(e.employee_id) AS employee_count
FROM departments d
JOIN employees e ON d.department_id = e.department_id
GROUP BY d.department_name
LIMIT 20;Salary Range by Job Title
SELECT job_title, MIN(salary) AS min_salary, MAX(salary) AS max_salary
FROM salaries s
JOIN employees e ON s.employee_id = e.employee_id
GROUP BY job_title
LIMIT 20;Load it with pandas
import pandas as pd
# Unzip the CSV download first: one file per table
departments = pd.read_csv("departments.csv")
employees = pd.read_csv("employees.csv")
salaries = pd.read_csv("salaries.csv")
# Join employees to departments
df = employees.merge(departments, left_on="department_id", right_on="department_id", how="left", suffixes=("", "_departments"))
print(df.groupby("department_name").size().sort_values(ascending=False))Using it in your tool
- Excel
- Load each table into a separate sheet. Use XLOOKUP or Power Query to join tables. Create a PivotTable with department and job title on rows and average salary as values.
- Power BI
- Create relationships between employees and departments (on department_id) and between employees and salaries (on employee_id). Build a bar chart for employees per department. Create measures for average salary and employee count.
- SQL
- Load the SQLite or SQL dump. Use foreign keys to join tables: employees.department_id to departments.department_id, and salaries.employee_id to employees.employee_id. Example join path: departments -> employees -> salaries.
Formats available
- CSV (zip)One CSV file per table, zipped
- Excel workbookOne worksheet per table
- SQLite databaseA ready-to-query database file with every table
- Parquet (zip)One Parquet file per table, zipped
- SQL scriptCREATE TABLE with primary and foreign keys, then INSERTs
- CSVA single CSV file
- JSONA single JSON file
How this data was generated
Synthetic data. Every row was generated: no real people, customers or companies are in this dataset.
Synthetic data generated by GoMask DataFactory from a relational blueprint: keys, links and rules are enforced in code, text columns are filled by a language model. No real people, companies or transactions.
- Data is synthetically generated by GoMask DataFactory.
- Includes realistic distributions for job titles and department locations.
- Salary data is generated with variations based on job title and hire date.
- Checked by an automated quality gate: unique keys, no orphan foreign keys, required columns filled, declared rules and date ranges (realism score 84).
Limitations
- The dataset is synthetic and does not represent real-world individuals or events.
- End dates for salaries are null for 84.7% of records, indicating current employment.
- Department names are limited to 5 distinct values, while department_id has 10 distinct values.
- Distributions and correlations are modelled, not measured from real records.
blueprint · employee-dataset
Scale this dataset
Same tables. As many rows as you need.
Open the blueprint behind these 3 tables in Data Factory: keep the relationships, change a column, and generate it at the size you need.
- 200,000 rows
- 1,000,000 rows
- Tables
- departments, employees, salaries
- Licence
- yours to use, including commercially
- API slug
- employee-dataset