Repeat Buyers Across Halves
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L4
Problem
The retention team is reviewing 2026 to find shoppers who stayed engaged the whole year instead of for just one season. Surface the users who bought something in both the first half of the year, January through June, and the second half, July through December, listed by user ID.
Summary
First half buyer. Second half buyer. Same person.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.