This SQL project demonstrates advanced data analysis skills by examining employee salary histories to track:
- Current compensation levels
- Career progression through promotions
- Salary growth patterns over time
- Frequency and magnitude of salary changes
Two tables form the foundation of this analysis:
-
employeestable (Master data):- Employee ID (Primary Key)
- Name
- Join Date
- Department
-
salary_historytable (Transaction data):- Employee ID (Foreign Key)
- Change Date
- Salary Amount
- Promotion Flag (Yes/No)
- Current Salary Benchmarking - Latest compensation for each employee
- Promotion Tracking - Count of career advancements
- Salary Change Analysis:
- Maximum percentage hike received
- Identification of employees who never had salary decreases
- Average months between salary adjustments
- Growth Rate Ranking - Employees ranked by overall salary growth since joining
- Complex SQL queries with Common Table Expressions (CTEs)
- Window functions for advanced analytics
- Precise date calculations
- Percentage change computations
- Data aggregation and ranking
- Execute
schema.sqlto create the database tables - Run
data.sqlto populate with sample data - Execute
analysis.sqlto generate the complete analysis
The analysis reveals:
- Employee growth trajectories
- Department-wise compensation patterns
- Most frequent promotion recipients
- Salary change trends over time
- HR Analytics
- Compensation Benchmarking
- Retention Risk Analysis
- Career Progression Studies