User Confirmation Timing
TikTok 👶 Easy SQL
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:

Input:

confirmations
confirmation_dateuser_id
2024-01-11 14:00:00101
2024-01-11 15:00:00102
2024-01-13 16:00:00103
signups
signup_dateuser_id
2024-01-10 09:00:00101
2024-01-11 10:00:00102
2024-01-12 11:00:00103

Output:
user_id
101
103
Quick Solution

Code Environment

Sign in or try as guest to run your code.

Sign In

Track

Question Difficulty Company Access
Need more practice in this area? Explore more questions →