User Confirmation Timing
Beginner Mode
Objective
Write a SQL query to identify users who confirmed their accounts on the second day after signing up.
Table Schema:
- signups
| Column | Type | Description |
|---|---|---|
| user_id | INTEGER | Unique identifier for each user |
| signup_date | DATETIME | Date and time when the user signed up |
- confirmations
| Column | Type | Description |
|---|---|---|
| user_id | INTEGER | ID of the user who confirmed |
| confirmation_date | DATETIME | Date and time when the confirmation occurred |
Task Requirements:
- Join signups with confirmations data
- Filter users who confirmed exactly on the second day after signup
- Exclude users who confirmed on the first day
- Sort results by user ID in ascending order
Output columns: user_id
Examples
Example 1:
Output:
Input:
| confirmations | |
|---|---|
| confirmation_date | user_id |
| 2024-01-11 14:00:00 | 101 |
| 2024-01-11 15:00:00 | 102 |
| 2024-01-13 16:00:00 | 103 |
| signups | |
|---|---|
| signup_date | user_id |
| 2024-01-10 09:00:00 | 101 |
| 2024-01-11 10:00:00 | 102 |
| 2024-01-12 11:00:00 | 103 |
| user_id |
|---|
| 101 |
| 103 |
Code Environment
Sign in or try as guest to run your code.
Track
| Question | Difficulty | Company | Access |
|---|
Need more practice in this area? Explore more questions →
TikTok