Loading interview...

Top Content by Lifetime Value

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

Domain
SQL
Difficulty
medium

Interview Prompt

Define each content item's lifetime value as the sum of watch_seconds from content_views across all viewers of that item. Ignore views with a null watch_seconds. Using DENSE_RANK over lifetime value descending, return content items in the top 3 ranks. If items tie at a rank, include all tied items. Show the content id, title, and lifetime value.

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