All at Once
A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- hard
- Seniority
- L5
Problem
For every API token ever issued, find the largest number of tokens that were active at the same time during this token's own active window, and the earliest date that peak was reached. A token counts as active from its issued date through the day before it expires, and a token with no expiration is treated as still active.
Summary
How many tokens were alive at the same time?
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.