Loading problem...
A platform trust team is auditing account emails against a strict signup policy.
Table: users
An email is considered policy-compliant when all rules hold:
Task: Return all rows from users whose mail is policy-compliant.
Output requirements:
Supported submission environments:
users:
| user_id | name | mail |
|---------|-----------|---------------------------|
| 1 | Winston | winston@example.test |
| 2 | Jonathan | jonathanisgreat |
| 3 | Annabelle | bella-@example.test |
| 4 | Sally | sally.come@example.test |
| 5 | Marwan | quarz#2020@example.test |
| 6 | David | david69@example.net |
| 7 | Shapiro | .shapo@example.test |[
{"user_id":1,"name":"Winston","mail":"winston@example.test"},
{"user_id":3,"name":"Annabelle","mail":"bella-@example.test"},
{"user_id":4,"name":"Sally","mail":"sally.come@example.test"}
]Explanation
Rows 1, 3, and 4 satisfy all policy rules. Other rows fail due to missing domain, invalid characters, wrong domain, or invalid starting character.
users:
| user_id | name | mail |
|---------|---------|--------------------------|
| 10 | Asha | A_1-2.x@example.test |
| 11 | Ben | 0ben@example.test |
| 12 | Cia | cia@Example.test |
| 13 | Dori | dori@example.test |
| 14 | Erin | erin__@example.test |[
{"user_id":10,"name":"Asha","mail":"A_1-2.x@example.test"},
{"user_id":13,"name":"Dori","mail":"dori@example.test"},
{"user_id":14,"name":"Erin","mail":"erin__@example.test"}
]Explanation
User 11 fails because the prefix starts with a digit. User 12 fails because the domain must match exact lowercase '@example.test'.
users:
| user_id | name | mail |
|---------|--------|------------------------|
| 20 | Nila | @example.test |
| 21 | Omar | -omar@example.test |
| 22 | Pia | pia@example.tes |
| 23 | Quinn | q+in@example.test |[]Explanation
All rows violate at least one rule: empty prefix, non-letter prefix start, wrong domain, or disallowed '+' in prefix.
Constraints