People Analytics & HR Systems Professional

SQL People Analytics: Headcount & Workforce Trends
Using SQL to query, structure, and analyze workforce data to surface headcount trends and support scalable people reporting.
Context
As organizations scale, people data often lives across large, structured datasets that require querying rather than spreadsheets alone. HR teams need the ability to extract accurate workforce metrics directly from data sources to support reporting, analytics, and decision-making.
SQL is a foundational skill for enabling scalable People Analytics.
Problem
The organization needed:
-
Reliable headcount and workforce trend metrics
-
A repeatable way to query employee-level data
-
Clear logic behind how people metrics were calculated
Spreadsheet-only analysis was not sufficient for scale or reproducibility.
Approach & Analysis
SQL was used to:
-
Query employee-level workforce data at the correct grain
-
Calculate core people metrics such as headcount and workforce trends
-
Structure queries to ensure accuracy, clarity, and reusability
The focus was on writing clean, interpretable queries that HR and analytics teams could trust and build upon.
Outputs
-
SQL queries calculating headcount and workforce counts
-
Time-based workforce trend outputs
-
Structured datasets ready for reporting or dashboarding
Executive Insights
-
Correct data grain is critical for accurate people metrics
-
SQL enables consistent, auditable workforce calculations
-
Query-based analysis scales more effectively than manual reporting
Business Impact
This work demonstrates how SQL can:
-
Improve confidence in workforce metrics
-
Enable scalable and repeatable people reporting
-
Serve as a strong foundation for dashboards and advanced analytics
Tools
-
SQL
-
BM HR Analytics Attrition Dataset
Visuals
-
Headcount by Department (SQL Query Output)

Demonstrates how SQL was used to query employee-level data and calculate department-wise headcount directly from the underlying workforce dataset.
Project link
A collection of SQL queries used to analyze headcount distribution, workforce stability, and hiring trends using a mock HR dataset inspired by real-world People Analytics use cases.