SQL Practice Logo

SQLPractice Online

Scenario SQL Question

Find Consecutive Employees with Increasing Salaries

Build mastery in Ranking Nth Value with this scenario-based SQL challenge and live execution support.

Problem Statement

List every employee whose salary is HIGHER than the previous employee's (ordered by hire_date). Show first_name, last_name, hire_date, salary, salary_diff (salary − previous salary), ordered by hire_date.

Relevant Tables

employees

SQL Concepts Used in This Scenario

Strengthen your understanding with these targeted learning topics: