runtime
14 / 88

task TRIM / LOWER / SUBSTR / REPLACE · easy

Emails used more than once

Some shoppers share an email once you ignore letter case and surrounding spaces. Return clean_email and shopper_count for every such email used by more than one shopper.

what to return

Columns
clean_emailshopper_count in this order
Rows
2 rows · any order
Watch for
clean_email = the email trimmed and lowercased.
Ignore shoppers with no email.
Skill
Normalise text before comparing it. Refresher: Filter groups with HAVING →

expected result

Your query should return exactly these columns and values. Run it and compare.

expected result2 rows · any order
clean_emailshopper_count
ana@harbor.test2
ben@harbor.test2

all 2 rows

data you can query

Sample rows from each table. Each column shows its type underneath; → marks a link to another table.

shoppers5 columns · 17 rows
idinteger · keynametextemailtextregiontextsignup_datetext
1Ana Ruizana@harbor.testWest2025-01-03
2Ben Okaforben@harbor.testEast2025-01-05
3Chloe Parkchloe@harbor.testWest2025-01-09
4Dmitri Volkovdmitri@harbor.testNorth2025-01-14
5Esi MensahNULLSouth2025-01-20

showing 5 of 17 rows

solution.sql
 

Hints and the answer are always available. Using them counts the question as solved with help.