← SQL Operations CasesMy saved work →
Independent practice · SQLite
Find shared customer emails
Your work
Active 0:00 · Paused 0sShow the reference answer
SELECT email,COUNT(*) AS customer_count FROM customers WHERE email IS NOT NULL AND email<>'' GROUP BY email HAVING COUNT(*)>1
The shared email has two customer IDs. Missing emails are not duplicate keys.