SQL Practice Logo

SQLPractice Online

Scenario SQL Question

Find Latest Record for Each Duplicate Group

Build mastery in Finding Duplicates with this scenario-based SQL challenge and live execution support.

Problem Statement

Inside each duplicate-email group, find the record with the most recent hire_date (use employee_id DESC as a tie-breaker). Return employee_id, first_name, last_name, email, hire_date, rn — ordered by email.

Relevant Tables

employees

SQL Concepts Used in This Scenario

Strengthen your understanding with these targeted learning topics: