Duplicate customer emails
beginner Data integrity Challenge 4 of 13
Registration should prevent two accounts with the same email address. Check whether the data agrees.
Requirements
- Return each duplicated email address in lower case as
email, with the number of accounts using it asaccounts. - Treat addresses that differ only in letter case as the same address.
- Only include addresses used by more than one account.
Expected output
email | accounts ava.patel@example.com | 2 ben.okafor@example.com | 2
Checks (3)
- ○Sample data
- ○A third account for the same address
- ○The duplicates are cleaned up
Each check builds a fresh database and compares your result with the reference solution's: same number of columns in the same order (names are not checked), and the same rows in any order.
query.sqlExecutes on SQLite in your browser
Ctrl/⌘ + Enter to check query · your code is saved in this browser
Results
Use Run query to see your rows, then Check query to grade it.
Schema · Acme Store
SQLiteLoading the database…
“null” marks columns that allow NULL. Foreign keys are not enforced, as in many real test databases.