Loading...

Token Churn Rate

A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.

Domain
SQL
Difficulty
medium
Seniority
mid, senior

Problem

Compute churn for API tokens in September 2026. Churn rate is the difference between tokens active on September 1 and tokens active on September 30, divided by the count on September 1. A token is active if it was issued on or before the target date and either has no expiration or expires on or after that date. Return a single churn rate.

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.