ISA-004 — Invalid Email Detection
🟢 Beginner
⏱ 15 Minutes
⭐ 10 Points
🔓 Free
💻 SQL | PySpark
🏢 Retail Analytics
Business Context
A retail company uses customer email addresses for marketing campaigns.
Recently, campaign delivery rates dropped significantly.
Investigation revealed that several customer records contain invalid email addresses.
The analytics team has been asked to identify all records that do not contain a valid email format.
For this challenge, an email is considered invalid if it does not contain:
@
Business Impact
Invalid email addresses reduce marketing campaign effectiveness, increase communication costs, and negatively impact customer engagement metrics.
The analytics team must identify invalid email records before they reach downstream systems.
Dataset
| customer_id | customer_name | |
|---|---|---|
| 101 | John | john@example.com |
| 102 | Alice | alice.example.com |
| 103 | Bob | bob@example.com |
| 104 | Sarah | sarah.gmail.com |
| 105 | David | david@example.com |
Task
Return only customers whose email address is invalid.
For this challenge:
Invalid Email = Missing '@'
Expected Output
| customer_id | customer_name | |
|---|---|---|
| 102 | Alice | alice.example.com |
| 104 | Sarah | sarah.gmail.com |
Constraints
- Email addresses may contain invalid values.
- An email is considered invalid if it does not contain '@'.
- Return only invalid customer records.
Supported Languages
✅ SQL
✅ PySpark
Hint
Look for email values that do not contain '@'.
Solution
🔒 Premium Solution
Premium members receive:
- SQL Solution
- PySpark Solution
- Step-by-Step Explanation
- Optimization Discussion