Find Customers with Duplicate Emails

Medium
joins Shopify Salesforce HubSpot

Given a customers table where some customers may share the same email address (e.g. duplicate signups), write a self-join query that finds every pair of customer records sharing an email. Return the two customer IDs and the shared email, avoiding both self-pairs and duplicate reversed pairs.

Tables

Hints (2 available)

SQL Editor

Output

Click "Run" to see results...