Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Number of Raises

Count how many times each employee's salary increased from one period to the next. Order by name.

Table schema

SalaryHistory(emp VARCHAR(10), salary INT, start_date DATE, end_date DATE)

Sample data

emp | salary | start_date | end_date
Ann | 50000 | 2024-01-01 | 2025-01-01
Ann | 60000 | 2025-01-01 | 2026-01-01
Ann | 75000 | 2026-01-01 | NULL
Bob | 40000 | 2024-06-01 | 2025-06-01
Bob | 42000 | 2025-06-01 | NULL

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.