Interview › Find duplicates

SQL interview: find duplicate emails (GROUP BY HAVING)

The hunt is a GROUP BY. The rows are a join back to that set.

Prompt. List every customer whose email appears more than once.

Hint: GROUP BY email HAVING COUNT(*) > 1

Uniqueidentifier keys do not make the email unique. UNIQUE on email does.

Then write it on a ticket

Monday is free. A colleague asks, you type, we mark it.

Clock in free