Routine~13min
The Customer With Two Accounts And One Email
Loyalty points support ticket: a customer says her points are "missing" — turns out she has two accounts because the signup form never normalized email casing or trims whitespace. 5 people have two accounts each where the email is identical once you lowercase and trim it (e.g. "[email protected]" vs "[email protected] "). A few unrelated people just happen to share a display name with genuinely different emails — that's a coincidence, not a duplicate.
Tables you'll query
customers
What you'll learn
String FunctionsAggregations & GROUP BY