Skip to content

HR Analytics project using SQLite — employee data analysis (departments, salaries, hires, terminations)

Notifications You must be signed in to change notification settings

BlladeRunner/hr-sql-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 HR Analytics (SQLite + SQL)

📊 Project Overview

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.


🧱 Dataset & Setup

  • Database: hr.db (SQLite, created locally — not pushed to Git)
  • Helper Script: bootstrap_hr.sql → creates and populates employees table
  • Tools: SQLite3 CLI, VS Code + SQLTools (SQLite driver)

⚙️ How to Run

# 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"

🧮 Analysis Highlights

  • 👩‍💼 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

🧠 Key Insights

  • 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).

💼 Business Relevance

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.

📂 File Structure

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)

🧰 Tools & Skills

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)

🔙 Back to Portfolio

About

HR Analytics project using SQLite — employee data analysis (departments, salaries, hires, terminations)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published