Loading...
7-Day Token Retention
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- senior
Problem
The developer platform team is worried about token churn and wants a quick retention curve. For each issuance date, they need two numbers side by side: how many tokens were active and generating traffic that day, and how many of those same owners still had an active, traffic-generating token 7 days later. Tokens with no expiration date should be treated as still valid. Limit the output to the first 7 dates chronologically.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.