A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L5
Problem
The security team is reviewing API key rotation policy. Calculate the longest period in days between consecutive token issuances and the longest period between consecutive token expirations in api_tokens. Ignore null expiration dates. Return both maximum gap values.
Summary
The longest gap between token events.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.