Loading problem...
An identity onboarding team wants to measure who successfully confirms account ownership on the day after registration.
You are given two tables:
Emails
Texts
Task: Find all users who have at least one verification text such that:
Output requirements:
Supported submission environments:
Emails:
| email_id | user_id | signup_date |
|----------|---------|----------------------|
| 125 | 7771 | 2022-06-14 09:30:00 |
| 433 | 1052 | 2022-07-09 08:15:00 |
| 234 | 7005 | 2022-08-20 10:00:00 |
Texts:
| text_id | email_id | signup_action | action_date |
|---------|----------|---------------|----------------------|
| 1 | 125 | Verified | 2022-06-15 08:30:00 |
| 2 | 433 | Not Verified | 2022-07-10 10:45:00 |
| 4 | 234 | Verified | 2022-08-21 09:30:00 |[
{"user_id":7005},
{"user_id":7771}
]Users 7005 and 7771 have a Verified action on date(signup_date + 1 day). User 1052 is excluded because the second-day action is Not Verified.
Emails:
| email_id | user_id | signup_date |
|----------|---------|----------------------|
| 10 | 3001 | 2023-01-05 23:50:00 |
| 11 | 3002 | 2023-01-05 00:05:00 |
Texts:
| text_id | email_id | signup_action | action_date |
|---------|----------|---------------|----------------------|
| 5 | 10 | Verified | 2023-01-06 00:01:00 |
| 6 | 11 | Verified | 2023-01-05 23:59:59 |[
{"user_id":3001}
]Verification uses calendar-date logic. Email 10 qualifies on next date; email 11 does not because action date is still the signup date.
Emails:
| email_id | user_id | signup_date |
|----------|---------|----------------------|
| 501 | 9001 | 2024-02-28 11:00:00 |
| 502 | 9001 | 2024-03-01 09:00:00 |
| 503 | 9002 | 2024-03-03 07:00:00 |
Texts:
| text_id | email_id | signup_action | action_date |
|---------|----------|---------------|----------------------|
| 20 | 501 | Verified | 2024-02-29 08:00:00 |
| 21 | 502 | Verified | 2024-03-02 10:00:00 |
| 22 | 503 | Not Verified | 2024-03-04 07:30:00 |
| 23 | 503 | Verified | 2024-03-05 08:30:00 |[
{"user_id":9001}
]User 9001 appears once even though two emails qualify. User 9002 does not qualify because the Verified action is two days after signup.
Constraints