The goal of this project is to analyze HR employee data to understand workforce composition,
department structure, salary distribution, and employee performance trends.
It demonstrates proficiency in SQL for data modeling, aggregation, joins, and the extraction business insights.
- Database:
hr.db(SQLite, created locally — not pushed to Git) - Helper Script:
bootstrap_hr.sql→ creates and populatesemployeestable - Tools: SQLite3 CLI, VS Code + SQLTools (SQLite driver)
# 1️⃣ Install SQLite (if not installed)
# https://www.sqlite.org/download.html
# 2️⃣ Open terminal and navigate to project directory
# 3️⃣ Build database and import data
sqlite3 hr.db ".read bootstrap_hr.sql"
# 4️⃣ Run analytical queries
sqlite3 hr.db ".read queries.sql"- 👩💼 Employee distribution by department and role
- 💰 Salary analysis by department and position
- ⏳ Average tenure and age by department
- 🧩 Correlation between salary, experience, and performance rating
- 📈 Department-level KPIs and top-performing employees
- The Sales and IT departments employ the largest share of staff.
- Finance and Engineering roles offer the highest average salaries.
- Median employee age is around 35 years, with 5–7 years of tenure.
- A positive correlation exists between experience and salary across departments.
- Turnover is lowest among employees with mid-level experience (5–10 years).
These insights help HR departments and business leaders:
- Optimize workforce distribution and identify high-performing teams.
- Design fair and competitive salary structures.
- Improve employee retention through data-driven HR strategies.
- Support decision-making for promotions and new hiring.
hr-sql-analysis/ ├─ bootstrap_hr.sql # Creates and populates employees table ├─ queries.sql # Analytical SQL queries ├─ README.md # Project overview ├─ .gitignore # Ignore local DB files (*.db) └─ hr.db # Local SQLite database (excluded from Git)
| Category | Details |
|---|---|
| Database | SQLite 3 |
| Tools | VS Code + SQLTools, Command-Line Interface |
| Skills Demonstrated | SQL Joins, Aggregations, Window Functions, HR KPIs |
| Dataset Source | Synthetic HR dataset (custom-generated for portfolio) |