3-Consecutive-Week Marketing Streak
Problem
**[Asked at Snowflake]**
Snowflake's marketing team touches users via email each week.
Find all users who received **at least 3 touches in consecutive weeks**
(week numbers are integers; consecutive means no gap).
Return `user_id`, ordered ascending.
Tables
Example rows — the live problem includes the full dataset.
marketing_touches
| touch_id | user_id | touch_week |
|---|
Expected output
Your answer should return 2 rows with the columns user_id.
Starter code (SQL)
SELECT *
FROM marketing_touches;Solve this SQL question free
Write SQL and run it instantly in your browser — even on your phone. No signup needed to try.
Solution & explanation
Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.
Sign up free to unlock