Loading interview...

Tenure Spread for Active Tokens

A hard SQL mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.

Domain
SQL
Difficulty
hard
Seniority
mid, senior

Interview Prompt

Among active API tokens (where expires is null or in the future), find the gap in days between the longest-tenured and shortest-tenured tokens. Also report how many tokens share the earliest issued date and how many share the latest. Return the day spread, count at earliest, and count at latest.

How This Interview Works

  1. Read the vague prompt (just like a real interview)
  2. Ask clarifying questions to the AI interviewer
  3. Write your sql solution with real code execution
  4. Get instant feedback and a hire/no-hire decision