Scenario SQL Question
Find Duplicate Records Using Self-Join
Build mastery in Finding Duplicates with this scenario-based SQL challenge and live execution support.
Problem Statement
Use a self-join to find every PAIR of employees that share an email but have different employee_ids. Return original_id (the smaller id), email, duplicate_id (the larger id), ordered by email then original_id.
Relevant Tables
employees
SQL Concepts Used in This Scenario
Strengthen your understanding with these targeted learning topics: