SQL Practice Logo

SQLPractice Online

Scenario SQL Question

Find Duplicate Records and Assign Row Numbers

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

Problem Statement

Inside each duplicate-email group, assign a row number 1..N based on employee_id ascending. Return employee_id, first_name, last_name, email, rn — ordered by email then rn so each duplicate group is shown together.

Relevant Tables

employees

SQL Concepts Used in This Scenario

Strengthen your understanding with these targeted learning topics: